[SCM] libav/experimental: fix segfault if flush is called before the first frame (I think that's it, and this fixes it)

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:44:17 UTC 2013


The following commit has been merged in the experimental branch:
commit ca15919699545e462301ceb00fab4f65b9e068e4
Author: Måns Rullgård <mans at mansr.com>
Date:   Wed Jun 1 12:03:25 2005 +0000

    fix segfault if flush is called before the first frame
    (I think that's it, and this fixes it)
    
    Originally committed as revision 4335 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index fa419e8..f7475d0 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3505,7 +3505,8 @@ static void flush_dpb(AVCodecContext *avctx){
         h->delayed_pic[i]= NULL;
     h->delayed_output_pic= NULL;
     idr(h);
-    h->s.current_picture_ptr->reference= 0;
+    if(h->s.current_picture_ptr)
+        h->s.current_picture_ptr->reference= 0;
 }
 
 /**

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list