[SCM] libav/experimental: Fixes a segfault when flushing delayed B-frames on the 2nd pass. patch by (Loren Merritt <lorenm.u at washington@edu>)

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:42:16 UTC 2013


The following commit has been merged in the experimental branch:
commit 80516d720ae2a9e8d01a83deb475f85c4c29e6df
Author: Loren Merritt <lorenm at u.washington.edu>
Date:   Tue Nov 23 23:58:54 2004 +0000

    Fixes a segfault when flushing delayed B-frames on the 2nd pass. patch by (Loren Merritt <lorenm.u at washington@edu>)
    
    Originally committed as revision 3707 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index ed1e6b7..3b097e1 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -2015,6 +2015,12 @@ static void select_input_picture(MpegEncContext *s){
                 for(i=0; i<s->max_b_frames+1; i++){
                     int pict_num= s->input_picture[0]->display_picture_number + i;
                     int pict_type= s->rc_context.entry[pict_num].new_pict_type;
+
+                    if(!s->input_picture[i]){
+                        if(i>0)
+                            s->rc_context.entry[pict_num-1].new_pict_type = P_TYPE;
+                        break;
+                    }
                     s->input_picture[i]->pict_type= pict_type;
                     
                     if(i + 1 >= s->rc_context.num_entries) break;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list