# HG changeset patch # User reimar # Date 1337116717 0 # Node ID 0640d4451aa7fcd34d2892cc877afd20dc081b13 # Parent 049b24e18a65bee85dc2e3216243d4912d669c3a Do not provide multiple B-frames for direct rendering. Fixes some extreme stuttering with some H.264 samples. diff -r 049b24e18a65 -r 0640d4451aa7 libmpcodecs/vd_ffmpeg.c --- a/libmpcodecs/vd_ffmpeg.c Tue May 15 20:56:53 2012 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Tue May 15 21:18:37 2012 +0000 @@ -563,8 +563,10 @@ } 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; }