Commit 26bd067f authored by Matthew Waters's avatar Matthew Waters 🐨 Committed by Tim-Philipp Müller

aggregator: don't leak gap buffer when out of segment

parent 0396bc2e
......@@ -1449,7 +1449,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;
......@@ -1471,6 +1470,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment