From 79faa0b9fa46b03da46e0739093b8a9c3bc372c2 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Wed, 10 Mar 2010 10:26:27 -0600 Subject: [PATCH] mpeg4videoparse: fix compile error gst/mpeg4videoparse/mpeg4videoparse.c:689: warning: comparison is always true due to limited range of data type https://bugzilla.gnome.org/show_bug.cgi?id=612454 --- gst/mpeg4videoparse/mpeg4videoparse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/mpeg4videoparse/mpeg4videoparse.c b/gst/mpeg4videoparse/mpeg4videoparse.c index aaca907..ceafd6f 100644 --- a/gst/mpeg4videoparse/mpeg4videoparse.c +++ b/gst/mpeg4videoparse/mpeg4videoparse.c @@ -686,8 +686,9 @@ gst_mpeg4vparse_sink_setcaps (GstPad * pad, GstCaps * caps) /* Usually the codec data will be a visual object sequence, containing a visual object, with a video object/video object layer. */ res = gst_mpeg4vparse_handle_vos (parse, data, GST_BUFFER_SIZE (buf)); - } else if (data[3] >= VIDEO_OBJECT_STARTCODE_MIN && - data[3] <= VIDEO_OBJECT_STARTCODE_MAX) { + } else if (data[3] <= VIDEO_OBJECT_STARTCODE_MAX) { + /* VIDEO_OBJECT_STARTCODE_MIN is zero, and data is unsigned, so we + don't need to check min (and in fact that causes a compile err */ /* Sometimes, instead, it'll just have the video object/video object layer data. We can parse that too, though it'll give us slightly less information. */ -- 2.7.4