From 8a67606c20958fa21db0b5ba9a17f379bc01786c Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 7 Apr 2016 18:26:58 +0200 Subject: vd_lavc: let hardware decoder request delaying frames explicitly Until now, the presence of the process_image() callback was used to set a delay queue with a hardcoded size. Change this to a vd_lavc_hwdec field instead, so the decoder can explicitly set this if it's really needed. Do this so process_image() can be used in the VideoToolbox glue code for something entirely unrelated. --- video/decode/vd_lavc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'video/decode/vd_lavc.c') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 175df0bc6e..a444f88c10 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -401,10 +401,7 @@ static void init_avctx(struct dec_video *vd, const char *decoder, avctx->get_buffer2 = get_buffer2_hwdec; if (ctx->hwdec->init(ctx) < 0) goto error; - // This can increase efficiency by not blocking on the hardware - // pipeline by reading back immediately after decoding. - if (ctx->hwdec->process_image) - ctx->max_delay_queue = HWDEC_DELAY_QUEUE_COUNT; + ctx->max_delay_queue = ctx->hwdec->delay_queue; } else { mp_set_avcodec_threads(vd->log, avctx, lavc_param->threads); } -- cgit v1.2.3