From 281e10f05d02d1afe24f644a2d8b1672113630fd Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 24 Feb 2013 23:15:11 +0100 Subject: dec_video: remove weird offset for VDCTRL_QUERY_UNSEEN_FRAMES The return value of get_current_video_decoder_lag() should be the same before and after this change in all cases. --- video/decode/vd_lavc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'video/decode/vd_lavc.c') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index d0dff169f5..4959324509 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -671,9 +671,11 @@ static int control(sh_video_t *sh, int cmd, void *arg) return CONTROL_TRUE; case VDCTRL_QUERY_UNSEEN_FRAMES:; int delay = avctx->has_b_frames; + assert(delay >= 0); if (avctx->active_thread_type & FF_THREAD_FRAME) delay += avctx->thread_count - 1; - return delay + 10; + *(int *)arg = delay; + return CONTROL_TRUE; case VDCTRL_RESET_ASPECT: if (ctx->vo_initialized) ctx->vo_initialized = false; -- cgit v1.2.3