gst: encode: h264_fei: remove useless comparison
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Thu, 19 Sep 2019 19:09:20 +0000 (12:09 -0700)
committerU. Artie Eoff <ullysses.a.eoff@intel.com>
Thu, 19 Sep 2019 19:09:35 +0000 (12:09 -0700)
The expression "len >= 0" is always true since "len"
is an unsigned type.  And it is clear that the writers
intention was not to write "len > 0" since we handle
len == 0 in the ensuing "if (len < 3)" conditional
block.

gst/vaapi/gstvaapiencode_h264_fei.c

index 0b1b74a..c09eaea 100644 (file)
@@ -241,7 +241,7 @@ _h264_byte_stream_next_nal (guint8 * buffer, guint32 len, guint32 * nal_size)
   guint32 flag = 0xFFFFFFFF;
   guint32 nal_start_len = 0;
 
-  g_assert (len >= 0 && buffer && nal_size);
+  g_assert (buffer && nal_size);
   if (len < 3) {
     *nal_size = len;
     nal_start = (len ? buffer : NULL);