mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-29 18:48:44 +00:00
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:
parent
929beb1ae0
commit
b4115aa83e
1 changed files with 6 additions and 4 deletions
|
@ -449,15 +449,17 @@ is_nal_equal (const guint8 * nal1, const guint8 * nal2, guint len)
|
||||||
if (!remainder) {
|
if (!remainder) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else if (1 == remainder) {
|
} else if (1 == remainder) {
|
||||||
return (nal1[--len] == nal2[len]);
|
--len;
|
||||||
|
return (nal1[len] == nal2[len]);
|
||||||
} else { /* 2 or 3 */
|
} else { /* 2 or 3 */
|
||||||
if (remainder & 1) { /* -1 if 3 bytes left */
|
if (remainder & 1) { /* -1 if 3 bytes left */
|
||||||
if (nal1[--len] != nal2[len])
|
--len;
|
||||||
|
if (nal1[len] != nal2[len])
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
/* last 2 bytes */
|
/* last 2 bytes */
|
||||||
return ((nal1[--len] == nal2[len]) /* -1 */
|
return ((nal1[len - 1] == nal2[len - 1]) /* -1 */
|
||||||
&&(nal1[--len] == nal2[len])); /* -2 */
|
&&(nal1[len - 2] == nal2[len - 2])); /* -2 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue