aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-08-04 16:05:05 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-08-04 16:05:05 +0000
commitb7adc711fa663f8714a3d096f763cf5129c99505 (patch)
treebb3d04117834e253630825be33c5bb22b48e5e99
parentd930ef19ea14c7fd43c7ad0a4184a9b55c8fdd76 (diff)
downloadffmpeg-b7adc711fa663f8714a3d096f763cf5129c99505.tar.gz
last_picture should be never == NULL (it was with dr1) this might fix a segfault with error concealment
Originally committed as revision 837 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/mpegvideo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 051c8d9348..654b0e0beb 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -657,6 +657,9 @@ void MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
s->next_picture[i] = tmp;
s->current_picture[i] = tmp;
+ if(s->last_picture[i]==NULL)
+ s->last_picture[i]= s->next_picture[i];
+
s->last_dr_opaque= s->next_dr_opaque;
s->next_dr_opaque= avctx->dr_opaque_frame;