summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-12-02 00:57:25 +0100
committerwm4 <wm4@nowhere>2017-12-02 00:57:25 +0100
commitb279cfb1dd75c757346d4b5515e758f44c93cb92 (patch)
tree2c821b108d2fbbe6681d562fe0791b91a986dbcc
parent5990f640f4ff4e2909c6adee6f8c1af7c8c47aa4 (diff)
downloadmpv-b279cfb1dd75c757346d4b5515e758f44c93cb92.tar.bz2
mpv-b279cfb1dd75c757346d4b5515e758f44c93cb92.tar.xz
vd_lavc: allow forcing single implementations with --hwdec
-rw-r--r--video/decode/vd_lavc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 159a4699f4..d3fe630498 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -435,7 +435,8 @@ static void select_and_set_hwdec(struct dec_video *vd)
if (!hw_codec || strcmp(hw_codec, codec) != 0)
continue;
- if (!hwdec_auto && !bstr_equals0(opt, hwdec->method_name))
+ if (!hwdec_auto && !(bstr_equals0(opt, hwdec->method_name) ||
+ bstr_equals0(opt, hwdec->name)))
continue;
MP_VERBOSE(vd, "Looking at hwdec %s...\n", hwdec->name);
@@ -483,7 +484,7 @@ int hwdec_validate_opt(struct mp_log *log, const m_option_t *opt,
int num_hwdecs = 0;
add_all_hwdec_methods(&hwdecs, &num_hwdecs);
- mp_info(log, "Valid values:\n");
+ mp_info(log, "Valid values (with alternative full names):\n");
for (int n = 0; n < num_hwdecs; n++) {
struct hwdec_info *hwdec = &hwdecs[n];