diff options
author | Luis de Bethencourt <luisbg@osg.samsung.com> | 2015-11-12 14:39:17 +0000 |
---|---|---|
committer | Luis de Bethencourt <luisbg@osg.samsung.com> | 2015-11-12 14:39:22 +0000 |
commit | 09c881ee146511d1a8d64fdf2b0f3b2b97af32de (patch) | |
tree | 59dbd192c8336bdc9a41e05a1f7c1ceb44dae77d | |
parent | df16e8dd5a27ba4feeae4f049d94132e2d4cb2f6 (diff) |
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
-rw-r--r-- | gst-libs/gst/pbutils/codec-utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gst-libs/gst/pbutils/codec-utils.c b/gst-libs/gst/pbutils/codec-utils.c index 18aefcc80..c37ca63bf 100644 --- a/gst-libs/gst/pbutils/codec-utils.c +++ b/gst-libs/gst/pbutils/codec-utils.c @@ -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); |