From c6691abba157f6fd0b921e7e1fbe90b8cfb37daf Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Thu, 21 Mar 2019 18:55:16 +1100 Subject: [PATCH] aggregator: don't leak gap buffer when out of segment --- libs/gst/base/gstaggregator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/gst/base/gstaggregator.c b/libs/gst/base/gstaggregator.c index bc8c05f..0acd8a2 100644 --- a/libs/gst/base/gstaggregator.c +++ b/libs/gst/base/gstaggregator.c @@ -1471,7 +1471,6 @@ gst_aggregator_default_sink_event (GstAggregator * self, GstBuffer *gapbuf; gst_event_parse_gap (event, &pts, &duration); - gapbuf = gst_buffer_new (); if (GST_CLOCK_TIME_IS_VALID (duration)) endpts = pts + duration; @@ -1493,6 +1492,7 @@ gst_aggregator_default_sink_event (GstAggregator * self, else duration = GST_CLOCK_TIME_NONE; + gapbuf = gst_buffer_new (); GST_BUFFER_PTS (gapbuf) = pts; GST_BUFFER_DURATION (gapbuf) = duration; GST_BUFFER_FLAG_SET (gapbuf, GST_BUFFER_FLAG_GAP); -- 2.7.4