[MPlayer-cvslog] r34904 - trunk/libmpcodecs/vd_ffmpeg.c

reimar subversion at mplayerhq.hu
Tue May 15 23:18:38 CEST 2012


Author: reimar
Date: Tue May 15 23:18:37 2012
New Revision: 34904

Log:
Do not provide multiple B-frames for direct rendering.

Fixes some extreme stuttering with some H.264 samples.

Modified:
   trunk/libmpcodecs/vd_ffmpeg.c

Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	Tue May 15 22:56:53 2012	(r34903)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Tue May 15 23:18:37 2012	(r34904)
@@ -563,8 +563,10 @@ static int get_buffer(AVCodecContext *av
     }
 
     if (ctx->nonref_dr) {
-        if (flags & MP_IMGFLAG_PRESERVE)
+        if (flags & MP_IMGFLAG_PRESERVE || ctx->b_count > 1) {
+            if (!(flags & MP_IMGFLAG_PRESERVE)) ctx->b_count--;
             return avcodec_default_get_buffer(avctx, pic);
+        }
         type = MP_IMGTYPE_TEMP;
     }
 


More information about the MPlayer-cvslog mailing list