Mercurial > mplayer.hg
diff libmpcodecs/vd_ffmpeg.c @ 34864:7af545739044
Only try to get a "numbered" mpi for nonref DR.
This is simpler, more flexible and more robust.
Should fix bug #2067.
author | reimar |
---|---|
date | Mon, 21 May 2012 20:00:03 +0000 |
parents | bbbe5519f1e7 |
children | 9ca42b4f88e7 |
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c Mon May 21 20:00:01 2012 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Mon May 21 20:00:03 2012 +0000 @@ -564,11 +564,11 @@ } if (ctx->nonref_dr) { - if (flags & MP_IMGFLAG_PRESERVE || ctx->b_count > 1) { - if (!(flags & MP_IMGFLAG_PRESERVE)) ctx->b_count--; + if (flags & MP_IMGFLAG_PRESERVE) return avcodec_default_get_buffer(avctx, pic); - } - type = MP_IMGTYPE_TEMP; + // Use NUMBERED since for e.g. TEMP vos assume there will + // be no other frames between the get_image and matching put_image. + type = MP_IMGTYPE_NUMBERED; } if(init_vo(sh, avctx->pix_fmt) < 0){