Lines Matching refs:ctx
41 WebPParseContext *ctx = s->priv_data;
42 uint64_t state = ctx->pc.state64;
50 if (ctx->pc.frame_start_found <= 8) {
53 if (ctx->pc.frame_start_found == 0) {
55 ctx->fsize = av_bswap32(state);
56 if (ctx->fsize > 15 && ctx->fsize <= UINT32_MAX - 10) {
57 ctx->pc.frame_start_found = 1;
58 ctx->fsize += 8;
61 } else if (ctx->pc.frame_start_found == 8) {
63 ctx->pc.frame_start_found = 0;
66 ctx->pc.frame_start_found++;
67 ctx->remaining_size = ctx->fsize + i - 15;
68 if (ctx->pc.index + i > 15) {
73 ctx->pc.state64 = 0;
76 } else if (ctx->pc.frame_start_found)
77 ctx->pc.frame_start_found++;
79 ctx->pc.state64 = state;
81 if (ctx->remaining_size) {
82 i = FFMIN(ctx->remaining_size, buf_size);
83 ctx->remaining_size -= i;
84 if (ctx->remaining_size)
87 ctx->pc.frame_start_found = 0;
93 if (ff_combine_frame(&ctx->pc, next, &buf, &buf_size) < 0)
97 ctx->pc.frame_start_found = FFMAX(ctx->pc.frame_start_found - i - 1, 0);
99 ctx->pc.frame_start_found = 0;