mirror of https://github.com/mpv-player/mpv
audio: fix af_fmt_change_bytes() with spdif formats
This could accidentally change some spdif formats to AAC (because AAC is the first on the list and will match first). spdif formats are inherently uninterchangeable, so treat them as their own class of formats (like int vs. float). Might fix some issues with ao_wasapi.c.
This commit is contained in:
parent
b984ec52aa
commit
617aff6cda
|
@ -51,7 +51,7 @@ int af_fmt_change_bytes(int format, int bytes)
|
|||
if (af_fmt_to_bytes(fmt) == bytes &&
|
||||
af_fmt_is_float(fmt) == af_fmt_is_float(format) &&
|
||||
af_fmt_is_planar(fmt) == af_fmt_is_planar(format) &&
|
||||
af_fmt_is_spdif(fmt) == af_fmt_is_spdif(format))
|
||||
(fmt == format || (!af_fmt_is_spdif(fmt) && !af_fmt_is_spdif(format))))
|
||||
return fmt;
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue