diff --git a/gst-libs/gst/codecparsers/gsth264parser.c b/gst-libs/gst/codecparsers/gsth264parser.c index 9dbfe46b98..2866e8ec7b 100644 --- a/gst-libs/gst/codecparsers/gsth264parser.c +++ b/gst-libs/gst/codecparsers/gsth264parser.c @@ -326,7 +326,8 @@ nal_reader_get_ue (NalReader * nr, guint32 * val) return FALSE; } - g_return_val_if_fail (i <= 32, FALSE); + if (G_UNLIKELY (i > 32)) + return FALSE; if (G_UNLIKELY (!nal_reader_get_bits_uint32 (nr, &value, i))) return FALSE;