# HG changeset patch # User michael # Date 1101254334 0 # Node ID e0bda0b8359ab9504414178d529754ce2b8b2169 # Parent 7a6ff8cc7c95afdbbef6d78c6ad743d4569ec30c Fixes a segfault when flushing delayed B-frames on the 2nd pass. patch by (Loren Merritt ) diff -r 7a6ff8cc7c95 -r e0bda0b8359a mpegvideo.c --- a/mpegvideo.c Sun Nov 21 18:04:56 2004 +0000 +++ b/mpegvideo.c Tue Nov 23 23:58:54 2004 +0000 @@ -2015,6 +2015,12 @@ for(i=0; imax_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;