streamsynchronizer: Don't leak the syncstream object
authorEdward Hervey <edward@centricular.com>
Fri, 11 Nov 2022 13:18:21 +0000 (14:18 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Sat, 12 Nov 2022 11:24:21 +0000 (12:24 +0100)
It was leaked when breaking out early when handling GST_EVENT_STREAM_START

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3390>

subprojects/gst-plugins-base/gst/playback/gststreamsynchronizer.c

index ec50263..6a0f26c 100644 (file)
@@ -419,13 +419,14 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent,
                 "Stream %d belongs to running stream %d, no waiting",
                 stream->stream_number, ostream->stream_number);
             stream->wait = FALSE;
-
+            gst_syncstream_unref (stream);
             GST_STREAM_SYNCHRONIZER_UNLOCK (self);
             break;
           }
         } else if (group_id == self->group_id) {
           GST_DEBUG_OBJECT (pad, "Stream %d belongs to running group %d, "
               "no waiting", stream->stream_number, group_id);
+          gst_syncstream_unref (stream);
           GST_STREAM_SYNCHRONIZER_UNLOCK (self);
           break;
         }