# HG changeset patch # User michael # Date 1211724455 0 # Node ID 8f656b589911a823f8642fba5ccf497e2ad85d21 # Parent e627df327e77a83cbb3b3dc95535770cf9b6c065 Fix MB skipping with droppable frames. Fixes issue323. diff -r e627df327e77 -r 8f656b589911 mpegvideo.c --- a/mpegvideo.c Sun May 25 13:31:07 2008 +0000 +++ b/mpegvideo.c Sun May 25 14:07:35 2008 +0000 @@ -236,7 +236,7 @@ /* It might be nicer if the application would keep track of these * but it would require an API change. */ memmove(s->prev_pict_types+1, s->prev_pict_types, PREV_PICT_TYPES_BUFFER_SIZE-1); - s->prev_pict_types[0]= s->pict_type; + s->prev_pict_types[0]= s->dropable ? FF_B_TYPE : s->pict_type; if(pic->age < PREV_PICT_TYPES_BUFFER_SIZE && s->prev_pict_types[pic->age] == FF_B_TYPE) pic->age= INT_MAX; // Skipped MBs in B-frames are quite rare in MPEG-1/2 and it is a bit tricky to skip them anyway.