mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
codec-utils: guint8 can't hold value over 255
channels is a guint8, so the max value is 255 and checking if it value is > 256 will never be false. CID 1338687, CID 1338688
This commit is contained in:
parent
df16e8dd5a
commit
09c881ee14
1 changed files with 2 additions and 2 deletions
|
@ -1271,7 +1271,7 @@ gst_codec_utils_opus_create_caps (guint32 rate,
|
|||
"coupled-count", G_TYPE_INT, coupled_count, NULL);
|
||||
}
|
||||
|
||||
g_return_val_if_fail (channels > 0 && channels < 256, NULL);
|
||||
g_return_val_if_fail (channels > 0, NULL);
|
||||
g_return_val_if_fail (stream_count > 0, NULL);
|
||||
g_return_val_if_fail (coupled_count <= stream_count, NULL);
|
||||
g_return_val_if_fail (channel_mapping != NULL, NULL);
|
||||
|
@ -1456,7 +1456,7 @@ gst_codec_utils_opus_create_header (guint32 rate,
|
|||
|
||||
channel_mapping = NULL;
|
||||
} else {
|
||||
g_return_val_if_fail (channels > 0 && channels < 256, NULL);
|
||||
g_return_val_if_fail (channels > 0, NULL);
|
||||
g_return_val_if_fail (stream_count > 0, NULL);
|
||||
g_return_val_if_fail (coupled_count <= stream_count, NULL);
|
||||
g_return_val_if_fail (channel_mapping != NULL, NULL);
|
||||
|
|
Loading…
Reference in a new issue