aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2018-03-07 22:39:51 +0100
committerGravatar Kevin Mitchell <kevmitch@gmail.com>2018-03-08 17:12:32 -0800
commit075aa21797e459b82bc95eb2c9336adfb8d562d0 (patch)
tree16f88f5dfa08519f5d70beb2093ca6d9e4df0bcf
parent93fb79166b4154281c66df3201cf55d9d0986fc5 (diff)
vd_lavc: slightly better logging about why hwdec is not used
The old message was outdated and also not very precise. Make it all a bit more elaborate.
-rw-r--r--video/decode/vd_lavc.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 94ddb384bd..5a8c2d53c5 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -417,7 +417,12 @@ static void select_and_set_hwdec(struct mp_filter *vd)
bool hwdec_auto_copy = bstr_equals0(opt, "auto-copy");
bool hwdec_auto = hwdec_auto_all || hwdec_auto_copy;
- if (hwdec_codec_allowed(vd, codec) && hwdec_requested) {
+ if (!hwdec_requested) {
+ MP_VERBOSE(vd, "No hardware decoding requested.\n");
+ } else if (!hwdec_codec_allowed(vd, codec)) {
+ MP_VERBOSE(vd, "Not trying to use hardware decoding: codec %s is not "
+ "on whitelist.\n", codec);
+ } else {
struct hwdec_info *hwdecs = NULL;
int num_hwdecs = 0;
add_all_hwdec_methods(&hwdecs, &num_hwdecs);
@@ -472,10 +477,9 @@ static void select_and_set_hwdec(struct mp_filter *vd)
}
talloc_free(hwdecs);
- } else {
- MP_VERBOSE(vd, "Not trying to use hardware decoding: codec %s is not "
- "on whitelist, or does not support hardware acceleration.\n",
- codec);
+
+ if (!ctx->use_hwdec)
+ MP_VERBOSE(vd, "No hardware decoding available for this codec.\n");
}
if (ctx->use_hwdec) {