rtpjitterbuffer: Fix parsing of the mediaclk:direct= field
authorSebastian Dröge <sebastian@centricular.com>
Tue, 16 Mar 2021 17:25:36 +0000 (19:25 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 16 Mar 2021 18:02:48 +0000 (18:02 +0000)
Due to an off-by-one when parsing the string, the most significant digit
or the clock offset was skipped when parsing the offset.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/907>

gst/rtpmanager/gstrtpjitterbuffer.c

index 8046988..ab38672 100644 (file)
@@ -1516,7 +1516,7 @@ gst_jitter_buffer_sink_parse_caps (GstRtpJitterBuffer * jitterbuffer,
       GST_DEBUG_OBJECT (jitterbuffer, "Got media clock %s", mediaclk);
 
       if (!g_str_has_prefix (mediaclk, "direct=") ||
-          !g_ascii_string_to_unsigned (&mediaclk[8], 10, 0, G_MAXUINT64,
+          !g_ascii_string_to_unsigned (&mediaclk[7], 10, 0, G_MAXUINT64,
               &clock_offset, NULL))
         GST_FIXME_OBJECT (jitterbuffer, "Unsupported media clock");
       if (strstr (mediaclk, "rate=") != NULL) {