From ac295960b8486f104a6aa800d8d31ca2eeba99a0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 16 Oct 2017 14:37:28 +0200 Subject: video: make it possible to always override hardware decoding format Mostly an obscure option for testing. But --videotoolbox-format can be deprecated, as it becomes redundant. We rely on the libavutil hwcontext implementation to reject invalid pixfmts, or not to blow up if they are incompatible. --- video/decode/vd_lavc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'video/decode/vd_lavc.c') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index fe0de0e43f..f036a630b5 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -807,6 +807,8 @@ static int init_generic_hwaccel(struct dec_video *vd) if (hwdec->image_format == IMGFMT_VIDEOTOOLBOX) av_sw_format = imgfmt2pixfmt(vd->opts->videotoolbox_format); + if (vd->opts->hwdec_image_format) + av_sw_format = imgfmt2pixfmt(vd->opts->hwdec_image_format); if (av_sw_format == AV_PIX_FMT_NONE) { MP_VERBOSE(ctx, "Unsupported hw decoding format: %s\n", -- cgit v1.2.3