diff options
author | wm4 <wm4@nowhere> | 2017-05-04 01:00:35 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-05-04 01:00:35 +0200 |
commit | 19bf3a72ff3fd36fbd2443f27e453d6e82b4dd2f (patch) | |
tree | 10c4760816ce02b82b7a850677f4e8ea254670c5 /video/decode | |
parent | 9f268d7613112bb090790d4e50c03bd3391efec7 (diff) | |
download | mpv-19bf3a72ff3fd36fbd2443f27e453d6e82b4dd2f.tar.bz2 mpv-19bf3a72ff3fd36fbd2443f27e453d6e82b4dd2f.tar.xz |
vd_lavc: fix build with FFmpeg 3.2
Sigh...
The functionality is not actually needed for vdpau, but if the vdpau
hwaccel is present, the FFmpeg version is new enough that it includes
the field.
Diffstat (limited to 'video/decode')
-rw-r--r-- | video/decode/vd_lavc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index d067b15401..d15f01768b 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -591,8 +591,13 @@ static void init_avctx(struct dec_video *vd, const char *decoder, ctx->hwdec_dev = hwdec_create_dev(vd, ctx->hwdec, false); if (!ctx->hwdec_dev) goto error; - if (!ctx->hwdec->set_hwframes) + if (!ctx->hwdec->set_hwframes) { +#if HAVE_VDPAU_HWACCEL avctx->hw_device_ctx = av_buffer_ref(ctx->hwdec_dev->av_device_ref); +#else + goto error; +#endif + } } ctx->max_delay_queue = ctx->hwdec->delay_queue; ctx->hw_probing = true; |