if (ff_MPV_common_init(s) < 0)
return -1;
- /* We need to set current_picture_ptr before reading the header,
- * otherwise we cannot store anything in there. */
- if (s->current_picture_ptr == NULL || s->current_picture_ptr->f.data[0]) {
- int i = ff_find_unused_picture(s, 0);
- if (i < 0)
- return i;
- s->current_picture_ptr = &s->picture[i];
- }
-
ret = h261_decode_picture_header(h);
/* skip if the header was thrashed */
ff_mpeg_flush(avctx);
- if (s->current_picture_ptr == NULL || s->current_picture_ptr->f.data[0]) {
- int i = ff_find_unused_picture(s, 0);
- if (i < 0)
- return i;
- s->current_picture_ptr = &s->picture[i];
- }
-
init_get_bits(&s->gb, buf, buf_size * 8);
s->loop_filter = avctx->skip_loop_filter < AVDISCARD_ALL;
}
}
- /* We need to set current_picture_ptr before reading the header,
- * otherwise we cannot store anything in there. */
- if (s->current_picture_ptr == NULL || s->current_picture_ptr->f.data[0]) {
- int i = ff_find_unused_picture(s, 0);
- if (i < 0)
- goto err;
- s->current_picture_ptr = &s->picture[i];
- }
-
// do parse frame header
v->pic_header_flag = 0;
v->first_pic_header_flag = 1;