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

reimar subversion at mplayerhq.hu
Mon May 21 22:00:03 CEST 2012


Author: reimar
Date: Mon May 21 22:00:03 2012
New Revision: 34952

Log:
Only try to get a "numbered" mpi for nonref DR.

This is simpler, more flexible and more robust.
Should fix bug #2067.

Modified:
   trunk/libmpcodecs/vd_ffmpeg.c

Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	Mon May 21 22:00:01 2012	(r34951)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Mon May 21 22:00:03 2012	(r34952)
@@ -564,11 +564,11 @@ static int get_buffer(AVCodecContext *av
     }
 
     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){


More information about the MPlayer-cvslog mailing list