Due to an off-by-one when parsing the string, the most significant digit
or the clock offset was skipped when parsing the offset.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/910

Signed-off-by: Jose Quaresma <[email protected]>
---
 ...Fix-parsing-of-the-mediaclk-direct-f.patch | 33 +++++++++++++++++++
 .../gstreamer1.0-plugins-good_1.18.4.bb       |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0002-rtpjitterbuffer-Fix-parsing-of-the-mediaclk-direct-f.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0002-rtpjitterbuffer-Fix-parsing-of-the-mediaclk-direct-f.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0002-rtpjitterbuffer-Fix-parsing-of-the-mediaclk-direct-f.patch
new file mode 100644
index 0000000000..14a9fe23aa
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0002-rtpjitterbuffer-Fix-parsing-of-the-mediaclk-direct-f.patch
@@ -0,0 +1,33 @@
+From ec1949dffd931d0ec7e4f67108a08ab1e2af0cfe Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <[email protected]>
+Date: Tue, 16 Mar 2021 19:25:36 +0200
+Subject: [PATCH] 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/910>
+
+Upstream-Status: Backport [b5bb4ede3a42273fafc1054f9cf106ca527e3c26]
+
+Signed-off-by: Jose Quaresma <[email protected]>
+---
+ gst/rtpmanager/gstrtpjitterbuffer.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c 
b/gst/rtpmanager/gstrtpjitterbuffer.c
+index 60d8ad875..02fe15adc 100644
+--- a/gst/rtpmanager/gstrtpjitterbuffer.c
++++ b/gst/rtpmanager/gstrtpjitterbuffer.c
+@@ -1534,7 +1534,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) {
+-- 
+2.31.0
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.4.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.4.bb
index 9fdc31549f..07cacdc68a 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.4.bb
@@ -6,6 +6,7 @@ BUGTRACKER = 
"https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues
 
 SRC_URI = 
"https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz
 \
            
file://0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch \
+           
file://0002-rtpjitterbuffer-Fix-parsing-of-the-mediaclk-direct-f.patch \
            "
 
 SRC_URI[sha256sum] = 
"b6e50e3a9bbcd56ee6ec71c33aa8332cc9c926b0c1fae995aac8b3040ebe39b0"
-- 
2.31.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#149727): 
https://lists.openembedded.org/g/openembedded-core/message/149727
Mute This Topic: https://lists.openembedded.org/mt/81502417/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to