39 const uint8_t **poutbuf,
int *poutbuf_size,
40 const uint8_t *buf,
int buf_size)
51 if (
ctx->pc.frame_start_found <= 8) {
52 for (;
i < buf_size;
i++) {
54 if (
ctx->pc.frame_start_found == 0) {
57 if (
ctx->fsize > 15 &&
ctx->fsize <= UINT32_MAX - 10) {
58 ctx->pc.frame_start_found = 1;
62 }
else if (
ctx->pc.frame_start_found == 8) {
64 ctx->pc.frame_start_found = 0;
67 ctx->pc.frame_start_found++;
68 ctx->remaining_size =
ctx->fsize +
i - 15;
69 if (
ctx->pc.index +
i > 15) {
77 }
else if (
ctx->pc.frame_start_found)
78 ctx->pc.frame_start_found++;
82 if (
ctx->remaining_size) {
84 ctx->remaining_size -=
i;
85 if (
ctx->remaining_size)
88 ctx->pc.frame_start_found = 0;
98 ctx->pc.frame_start_found =
FFMAX(
ctx->pc.frame_start_found -
i - 1, 0);
100 ctx->pc.frame_start_found = 0;
103 *poutbuf_size = buf_size;
static AVFormatContext * ctx
static int parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
static av_cold void close(AVCodecParserContext *s)
#define i(width, name, range_min, range_max)
common internal and external API header
void(* flush)(AVBSFContext *ctx)
static struct @346255127015250356166251341105367306144006377143 state
#define MKBETAG(a, b, c, d)
av_cold void ff_parse_close(AVCodecParserContext *s)
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
#define PARSER_CODEC_LIST(...)
const FFCodecParser ff_webp_parser
main external API structure.
static int webp_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)