[SCM] libav/experimental: fix segfault with http://sam.zoy.org/zzuf/lol-ffplay.mpg and http://sam.zoy.org/zzuf/lol-ffplay.m2v

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:55:02 UTC 2013


The following commit has been merged in the experimental branch:
commit 0e066acb62a7ef4e54b55b3ebd56190ddf171d66
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Mon Jan 15 23:26:09 2007 +0000

    fix segfault with http://sam.zoy.org/zzuf/lol-ffplay.mpg and http://sam.zoy.org/zzuf/lol-ffplay.m2v
    
    Originally committed as revision 7538 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 36d7153..27d689f 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -3178,6 +3178,10 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
                             if(mpeg_field_start(s2) < 0)
                         return -1;
                     }
+                if(!s2->current_picture_ptr){
+                    av_log(avctx, AV_LOG_ERROR, "current_picture not initalized\n");
+                    return -1;
+                }
 
                 if(avctx->thread_count > 1){
                     int threshold= (s2->mb_height*s->slice_count + avctx->thread_count/2) / avctx->thread_count;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list