mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 23:40:26 +00:00
fixed lavd always selected
Fixes the commit b62566ca72 (2th Oct 2023), which caused that lavd was
always selected as the decoder, even though not designated. Eg.:
```
$ uv -t testcard:codec=I420 -d gl
Decompressor "libavcodec" initialized successfully.
[lavd] Unsupported codec!!!
```
The problem was that on probe ugc==VC_NONE and HW acceleration is not
set, thus hw_accel_to_ug_pixfmt(0) return also VC_NONE, in which case
the decoder is unconditionally selected for all formats.
This commit is contained in:
@@ -1156,7 +1156,8 @@ static int libavcodec_decompress_get_priority(codec_t compression, struct pixfmt
|
||||
PRIO_LOWER = 800,
|
||||
PRIO_LO = 900,
|
||||
};
|
||||
if (hw_accel_to_ug_pixfmt(internal.accel_type) == ugc) {
|
||||
if (internal.accel_type != HWACCEL_NONE &&
|
||||
hw_accel_to_ug_pixfmt(internal.accel_type) == ugc) {
|
||||
return PRIO_HI;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user