mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
tsdemux: fix pending buffers leak when flushing
https://bugzilla.gnome.org/show_bug.cgi?id=757895
This commit is contained in:
parent
a336181ef5
commit
21a025c2a1
1 changed files with 14 additions and 0 deletions
|
@ -1729,6 +1729,20 @@ gst_ts_demux_stream_flush (TSDemuxStream * stream, GstTSDemux * tsdemux,
|
||||||
stream->gap_ref_buffers = 0;
|
stream->gap_ref_buffers = 0;
|
||||||
stream->gap_ref_pts = GST_CLOCK_TIME_NONE;
|
stream->gap_ref_pts = GST_CLOCK_TIME_NONE;
|
||||||
stream->continuity_counter = CONTINUITY_UNSET;
|
stream->continuity_counter = CONTINUITY_UNSET;
|
||||||
|
|
||||||
|
if (G_UNLIKELY (stream->pending)) {
|
||||||
|
GList *tmp;
|
||||||
|
|
||||||
|
GST_DEBUG ("clearing pending %p", stream);
|
||||||
|
for (tmp = stream->pending; tmp; tmp = tmp->next) {
|
||||||
|
PendingBuffer *pend = (PendingBuffer *) tmp->data;
|
||||||
|
gst_buffer_unref (pend->buffer);
|
||||||
|
g_slice_free (PendingBuffer, pend);
|
||||||
|
}
|
||||||
|
g_list_free (stream->pending);
|
||||||
|
stream->pending = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (hard) {
|
if (hard) {
|
||||||
stream->first_pts = GST_CLOCK_TIME_NONE;
|
stream->first_pts = GST_CLOCK_TIME_NONE;
|
||||||
stream->need_newsegment = TRUE;
|
stream->need_newsegment = TRUE;
|
||||||
|
|
Loading…
Reference in a new issue