From 538e2ef1d039c857db26b916f9611f66d34412b9 Mon Sep 17 00:00:00 2001 From: Jakub Adam Date: Wed, 21 Apr 2021 17:18:51 +0200 Subject: [PATCH] rtpbasedepay: fix locking of GstRTPHeaderExtension 'ext' object unlocked if gst_rtp_header_extension_read() fails was never locked in the first place. Part-of: --- gst-libs/gst/rtp/gstrtpbasedepayload.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst-libs/gst/rtp/gstrtpbasedepayload.c b/gst-libs/gst/rtp/gstrtpbasedepayload.c index b1e12d9c10..c2645fbf8f 100644 --- a/gst-libs/gst/rtp/gstrtpbasedepayload.c +++ b/gst-libs/gst/rtp/gstrtpbasedepayload.c @@ -1233,6 +1233,7 @@ read_rtp_header_extensions (GstRTPBaseDepayload * depayload, } if (ext) { + GST_OBJECT_LOCK (ext); if (!gst_rtp_header_extension_read (ext, ext_flags, &pdata[offset], read_len, output)) { GST_WARNING_OBJECT (depayload, "RTP header extension (%s) could " @@ -1246,6 +1247,7 @@ read_rtp_header_extensions (GstRTPBaseDepayload * depayload, needs_src_caps_update = TRUE; } + GST_OBJECT_UNLOCK (ext); gst_object_unref (ext); } GST_OBJECT_UNLOCK (depayload);