mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 12:32:29 +00:00
opusdec: prevent 'channels=0' in caps
gst_opus_channel_positions() should fail if caps contains "channels=0". Prevent index underflow when indexing gst_opus_channel_positions[] (CID 1462590). Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/644>
This commit is contained in:
parent
6a1e575345
commit
4610bb59ac
1 changed files with 1 additions and 1 deletions
|
@ -1613,7 +1613,7 @@ gst_codec_utils_opus_parse_caps (GstCaps * caps,
|
|||
if (channel_mapping_family)
|
||||
*channel_mapping_family = f;
|
||||
|
||||
if (!gst_structure_get_int (s, "channels", &c)) {
|
||||
if (!gst_structure_get_int (s, "channels", &c) || c == 0) {
|
||||
if (f == 0)
|
||||
c = 2;
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue