changeset 34291:e61a652e9cf1

Finally apply forgotten patch to fix VDCTRL_QUERY_UNSEEN_FRAMES result for vd_ffmpeg.
author reimar
date Sat, 03 Dec 2011 18:43:54 +0000
parents be2dc5bcdc19
children e60d8bdb4795
files libmpcodecs/vd_ffmpeg.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Sat Dec 03 08:03:12 2011 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Sat Dec 03 18:43:54 2011 +0000
@@ -180,8 +180,10 @@
         avcodec_flush_buffers(avctx);
         return CONTROL_TRUE;
     case VDCTRL_QUERY_UNSEEN_FRAMES:
-        // has_b_frames includes delay due to frame-multithreading
-        return avctx->has_b_frames + 10;
+        // "has_b_frames" contains the (e.g. reorder) delay as sepcified
+        // in the standard. "delay" contains the libavcodec-specific delay
+        // e.g. due to frame multithreading
+        return avctx->has_b_frames + avctx->delay + 10;
     }
     return CONTROL_UNKNOWN;
 }