[FFmpeg-cvslog] r13378 - trunk/libavcodec/mpegvideo.c
michael
subversion
Sun May 25 16:07:35 CEST 2008
Author: michael
Date: Sun May 25 16:07:35 2008
New Revision: 13378
Log:
Fix MB skiping with dropable frames.
Fixes issue323.
Modified:
trunk/libavcodec/mpegvideo.c
Modified: trunk/libavcodec/mpegvideo.c
==============================================================================
--- trunk/libavcodec/mpegvideo.c (original)
+++ trunk/libavcodec/mpegvideo.c Sun May 25 16:07:35 2008
@@ -236,7 +236,7 @@ int alloc_picture(MpegEncContext *s, Pic
/* 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.
More information about the ffmpeg-cvslog
mailing list