summaryrefslogtreecommitdiffstats
path: root/gst/rtp
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2009-02-24 17:35:46 +0000
committerJan Schmidt <thaytan@noraisin.net>2009-02-24 17:59:29 +0000
commitb4115aa83e0804b0e315a4ecf9ca037c00c26a48 (patch)
tree8d7b65dd055f762c88e8c71ab0021313cee3b1ac /gst/rtp
parent929beb1ae0b6a6dcaff6b0c7c523f2d318e3416d (diff)
rtp: Fix compiler warning in h264 payloader
Fix an undefined behaviour warning from gcc 4.4.0 Patch By: Tim-Philipp Müller <tim.muller@collabora.co.uk> Fixes: #570995 Signed-Off-By: Jan Schmidt <jan.schmidt@sun.com>
Diffstat (limited to 'gst/rtp')
-rw-r--r--gst/rtp/gstrtph264pay.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gst/rtp/gstrtph264pay.c b/gst/rtp/gstrtph264pay.c
index 8fdd895a..a788316b 100644
--- a/gst/rtp/gstrtph264pay.c
+++ b/gst/rtp/gstrtph264pay.c
@@ -449,15 +449,17 @@ is_nal_equal (const guint8 * nal1, const guint8 * nal2, guint len)
if (!remainder) {
return TRUE;
} else if (1 == remainder) {
- return (nal1[--len] == nal2[len]);
+ --len;
+ return (nal1[len] == nal2[len]);
} else { /* 2 or 3 */
if (remainder & 1) { /* -1 if 3 bytes left */
- if (nal1[--len] != nal2[len])
+ --len;
+ if (nal1[len] != nal2[len])
return FALSE;
}
/* last 2 bytes */
- return ((nal1[--len] == nal2[len]) /* -1 */
- &&(nal1[--len] == nal2[len])); /* -2 */
+ return ((nal1[len - 1] == nal2[len - 1]) /* -1 */
+ &&(nal1[len - 2] == nal2[len - 2])); /* -2 */
}
}