diff options
author | wm4 <wm4@nowhere> | 2016-04-07 18:26:58 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-04-07 18:47:32 +0200 |
commit | 8a67606c20958fa21db0b5ba9a17f379bc01786c (patch) | |
tree | bd571e5bad63320ae7aaa25ba23309ac2dc2957b /video/decode/vd_lavc.c | |
parent | f009d16f362694b6f49571b76f8b0331966824b5 (diff) | |
download | mpv-8a67606c20958fa21db0b5ba9a17f379bc01786c.tar.bz2 mpv-8a67606c20958fa21db0b5ba9a17f379bc01786c.tar.xz |
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.
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r-- | video/decode/vd_lavc.c | 5 |
1 files changed, 1 insertions, 4 deletions
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); } |