# HG changeset patch # User reimar # Date 1337630403 0 # Node ID 7af545739044151ae8a7e1dea93a5ee5de370112 # Parent 04cd132753bc960c5497cd6d1099b31cb2331073 Only try to get a "numbered" mpi for nonref DR. This is simpler, more flexible and more robust. Should fix bug #2067. diff -r 04cd132753bc -r 7af545739044 libmpcodecs/vd_ffmpeg.c --- 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){