vd_lavc: log if hw decoding selects a different underlying decoder

Less confusing to see what's going on. I think there were more than one
users who got tricked by this, including myself.
This commit is contained in:
wm4 2016-09-30 12:06:55 +02:00
parent 7e6456f43a
commit 1d385b0dae
1 changed files with 3 additions and 0 deletions

View File

@ -417,11 +417,14 @@ static void reinit(struct dec_video *vd)
}
if (hwdec) {
const char *orig_decoder = decoder;
if (hwdec->get_codec)
decoder = hwdec->get_codec(ctx, decoder);
if (hwdec->lavc_suffix)
decoder = hwdec_find_decoder(codec, hwdec->lavc_suffix);
MP_VERBOSE(vd, "Trying hardware decoding.\n");
if (strcmp(orig_decoder, decoder) != 0)
MP_VERBOSE(vd, "Using underlying hw-decoder '%s'\n", decoder);
} else {
MP_VERBOSE(vd, "Using software decoding.\n");
}