summaryrefslogtreecommitdiffstats
path: root/video/fmt-conversion.c
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2023-07-01 10:16:16 -0700
committerPhilip Langdale <github.philipl@overt.org>2023-07-14 20:41:24 -0700
commit4501e079968d7800424c45e567130308e959aeeb (patch)
treecaf73888deacf26f7075269d21785f1b4604405b /video/fmt-conversion.c
parent1f683401aa52c03e231532589310415b2449047b (diff)
downloadmpv-4501e079968d7800424c45e567130308e959aeeb.tar.bz2
mpv-4501e079968d7800424c45e567130308e959aeeb.tar.xz
vd_lavc: try other hwdecs when falling back after an hwdec failure
Today, if hwdec initialisation succeeds, we move on to attempting decoding, and if decoding fails, we enter a fallback path that will only do software decoding. This is suboptimal because some hwdecs and codec combinations can pass hwdec init, but then fail at hwaccel init, or even frame decoding. In these situations, we will never attempt other hwdecs in the `auto` or manually specified lists which might work. One good example is someone tries to use `vulkan,auto` and tries to play av1 content. The vulkan decoding will fail at hwaccel init time, and then fallback to software instead of going through the auto list which would allow vaapi, nvdec, etc to play the file. Instead, let's not give up immediately, and try the next hwdec after a failure, just like we do if hwdec init fails. The key part of this change is to keep track of the hwdecs we have tried, so that each time we run through hwdec selection, we don't try the same one over and over again. If we really get through the whole list with no success, we will then fall back to software decoding. Fixes #11865
Diffstat (limited to 'video/fmt-conversion.c')
0 files changed, 0 insertions, 0 deletions