From: Luis de Bethencourt Date: Thu, 12 Nov 2015 14:39:17 +0000 (+0000) Subject: codec-utils: guint8 can't hold value over 255 X-Git-Tag: 1.19.3~511^2~3205 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=09c881ee146511d1a8d64fdf2b0f3b2b97af32de;p=platform%2Fupstream%2Fgstreamer.git 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 --- diff --git a/gst-libs/gst/pbutils/codec-utils.c b/gst-libs/gst/pbutils/codec-utils.c index 18aefcc..c37ca63 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);