1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

mpegvideo: do not set current_picture_ptr in decoders

This code was originally added in
5f1948111a to h263 to set decoded frame
pts to some random numbers (removed in
a1c5cc429d) and then cargo culted to other
decoders.

The code is left in h263dec for now, since some part of the decoder
(apparently OBMC) relies on the specific previous frame to be reused.
This commit is contained in:
Anton Khirnov 2013-12-01 12:57:47 +01:00
parent 58a868968d
commit 66499f34b5
3 changed files with 0 additions and 25 deletions

View File

@ -584,15 +584,6 @@ retry:
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 */

View File

@ -377,13 +377,6 @@ static int decode_wmv9(AVCodecContext *avctx, const uint8_t *buf, int buf_size,
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;

View File

@ -5914,15 +5914,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
v->pic_header_flag = 0;
v->first_pic_header_flag = 1;