[FFmpeg-cvslog] mpegvideo: fix null pointer dereference on switching streams

Michael Niedermayer git at videolan.org
Tue Mar 26 22:04:13 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Mar 26 21:54:36 2013 +0100| [46c48d546ddf5125fcfae63f94c1e635e3a75f18] | committer: Michael Niedermayer

mpegvideo: fix null pointer dereference on switching streams

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=46c48d546ddf5125fcfae63f94c1e635e3a75f18
---

 libavcodec/mpegvideo.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 2e37ef1..f4739c4 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -695,6 +695,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
     s->input_picture_number = s1->input_picture_number;
 
     av_assert0(!s->picture || s->picture != s1->picture);
+    if(s->picture)
     for (i = 0; i < MAX_PICTURE_COUNT; i++) {
         ff_mpeg_unref_picture(s, &s->picture[i]);
         if (s1->picture[i].f.data[0] &&



More information about the ffmpeg-cvslog mailing list