From 66499f34b56fc6a9fdef25543bd9d576fc787895 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 1 Dec 2013 12:57:47 +0100 Subject: mpegvideo: do not set current_picture_ptr in decoders This code was originally added in 5f1948111a4920ff74e31b4284ab0200f7938539 to h263 to set decoded frame pts to some random numbers (removed in a1c5cc429d99216406170eac7e8352860076d3e8) 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. --- libavcodec/vc1dec.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'libavcodec/vc1dec.c') diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index ab4e098fac..141969f958 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -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; -- cgit v1.2.3