rtpjitterbuffer: Fix parsing of the mediaclk:direct= field

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>
This commit is contained in:
Sebastian Dröge 2021-03-16 19:25:36 +02:00 committed by GStreamer Marge Bot
parent f37afdafff
commit 00e73e1657

View 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) {