mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-17 21:06:17 +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) {
|
||||
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 */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue