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>
This commit is contained in:
Tim-Philipp Müller 2009-02-24 17:35:46 +00:00 committed by Jan Schmidt
parent 929beb1ae0
commit b4115aa83e

View file

@ -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 */
}
}