From e64ef6089f49e2b698d58f0eaec263f23eb6f4ee Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Sun, 2 Jul 2023 10:13:42 -0700 Subject: [PATCH] vd_lavc: map `hwdec=yes` to `hwdec=auto-safe` To remain consistent with our belief that `auto-safe` should be the recommended mode when turning on hw decoding, let's remap `yes` from `auto` to `auto-safe`. --- DOCS/man/options.rst | 2 +- video/decode/vd_lavc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 2766a8dbd0..46dd39373a 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -1250,7 +1250,7 @@ Video :no: always use software decoding (default) :auto-safe: enable any whitelisted hw decoder (see below) :auto: forcibly enable any hw decoder found (see below) - :yes: exactly the same as ``auto`` + :yes: exactly the same as ``auto-safe`` :auto-copy: enable best hw decoder with copy-back (see below) .. note:: diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 33a6da85d2..7260904b03 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -479,10 +479,10 @@ static void select_and_set_hwdec(struct mp_filter *vd) bool hwdec_requested = !bstr_equals0(opt, "no"); bool hwdec_auto_all = bstr_equals0(opt, "auto") || - bstr_equals0(opt, "yes") || bstr_equals0(opt, ""); bool hwdec_auto_safe = bstr_equals0(opt, "auto-safe") || - bstr_equals0(opt, "auto-copy-safe"); + bstr_equals0(opt, "auto-copy-safe") || + bstr_equals0(opt, "yes"); bool hwdec_auto_copy = bstr_equals0(opt, "auto-copy") || bstr_equals0(opt, "auto-copy-safe"); bool hwdec_auto = hwdec_auto_all || hwdec_auto_copy || hwdec_auto_safe;