1
mirror of https://github.com/mpv-player/mpv synced 2024-09-12 23:45:53 +02:00
mpv/video/decode
Avi Halachmi (:avih) 836e87e6d4 hwdec: warn on unsupported hwdec option value
Previously, when mpv was invoked with unsupported hwdec value, such
as --hwdec=foobar, there was no indication that it doesn't exist.

The reason it's not validated during options parsing is that the name
is only evaluated when selecting hwdec for actual decoding, by
matching it against runtime list of names from ffmpeg.

Additionally, when selecting hwdec for decoding, matching the name
came after filtering by codec, hence overall never-matched-name did
not necessarily indicate it's unsupported (doesn't exist at all).

Now we check the name before filtering by codec, and when done,
warn if no hwdec with that name exists at all.

This means that an unsupported name will now generate such warning
whenever we try to choose a hwdec, i.e. possibly more than once.

It's much better than no notification at all, and arguably adequate
for a sort of configuration error (linked ffmpeg has no such hwdec
name) which we don't validate during option parsing.
2022-03-07 01:05:20 +02:00
..
vd_lavc.c hwdec: warn on unsupported hwdec option value 2022-03-07 01:05:20 +02:00