mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Merge commit '66499f34b56fc6a9fdef25543bd9d576fc787895'
* commit '66499f34b56fc6a9fdef25543bd9d576fc787895': mpegvideo: do not set current_picture_ptr in decoders Conflicts: libavcodec/mss2.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
0d9f2f5c47
@ -586,15 +586,6 @@ retry:
|
|||||||
if (ff_MPV_common_init(s) < 0)
|
if (ff_MPV_common_init(s) < 0)
|
||||||
return -1;
|
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);
|
ret = h261_decode_picture_header(h);
|
||||||
|
|
||||||
/* skip if the header was thrashed */
|
/* skip if the header was thrashed */
|
||||||
|
@ -377,13 +377,6 @@ static int decode_wmv9(AVCodecContext *avctx, const uint8_t *buf, int buf_size,
|
|||||||
|
|
||||||
ff_mpeg_flush(avctx);
|
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];
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((ret = init_get_bits8(&s->gb, buf, buf_size)) < 0)
|
if ((ret = init_get_bits8(&s->gb, buf, buf_size)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -5968,15 +5968,6 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 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
|
// do parse frame header
|
||||||
v->pic_header_flag = 0;
|
v->pic_header_flag = 0;
|
||||||
v->first_pic_header_flag = 1;
|
v->first_pic_header_flag = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user