From 3ccac74de22bc79e3a228b52ffcb5bbb927772dd Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 3 Oct 2015 22:10:44 +0200 Subject: video: remove codec delay estimation This was used only by the timestamp sorting code, which is a fallback for avi files (as well as avi-muxed mkv files). This was supposed to prevent accumulating timestamps in case the decoder consumes more packets than it outputs frames (i.e. frames are dropped). This didn't work very well (timestamps could be off by a large amount), the estimation of the delay was fragile, and the interdependencies with the decoder were annoying, so kill it. --- video/decode/vd_lavc.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'video/decode/vd_lavc.c') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index e5ce92addb..9cc73d033a 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -689,13 +689,6 @@ static int control(struct dec_video *vd, int cmd, void *arg) case VDCTRL_RESET: avcodec_flush_buffers(avctx); 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; - *(int *)arg = delay; - return CONTROL_TRUE; case VDCTRL_GET_HWDEC: { int hwdec = ctx->hwdec ? ctx->hwdec->type : 0; if (!ctx->software_fallback_decoder) -- cgit v1.2.3