# HG changeset patch # User reimar # Date 1302212896 0 # Node ID a2a32138597bca15816129b60c68fde78454cd7a # Parent 1cad23803d9463c2bb53538678f862f8f2e3a70c More precise decoder lag calculation for frame-multithreading. diff -r 1cad23803d94 -r a2a32138597b libmpcodecs/vd_ffmpeg.c --- a/libmpcodecs/vd_ffmpeg.c Thu Apr 07 21:08:49 2011 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Thu Apr 07 21:48:16 2011 +0000 @@ -173,6 +173,8 @@ avcodec_flush_buffers(avctx); return CONTROL_TRUE; case VDCTRL_QUERY_UNSEEN_FRAMES: + if (avctx->active_thread_type & FF_THREAD_FRAME) + return avctx->has_b_frames + avctx->thread_count + 10; return avctx->has_b_frames + 10; } return CONTROL_UNKNOWN;