diff libmpcodecs/vd_ffmpeg.c @ 32613:e006d3eb4e60

Treat non-ref frames like B-frames even if has_b_frames is not set and they are indeed not B-frames (no reordering). This happens with flv files, as in bug #1079, and this change fixes that corruption.
author reimar
date Sun, 12 Dec 2010 10:23:41 +0000
parents 02830ab7afb7
children cf80c8f31a1b
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Sun Dec 12 01:32:21 2010 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Sun Dec 12 10:23:41 2010 +0000
@@ -636,7 +636,7 @@
             return avctx->get_buffer(avctx, pic);
         }
 
-        if(avctx->has_b_frames){
+        if(avctx->has_b_frames || ctx->b_count){
             type= MP_IMGTYPE_IPB;
         }else{
             type= MP_IMGTYPE_IP;