mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
tsdemux: Fix pad leak when the pad is never exposed
If tsdemux never receives data for a stream, the corresponding pad will never be added and stream->active will remain FALSE. When the stream is removed, the pad will not be unreffed and will be leaked. https://bugzilla.gnome.org/show_bug.cgi?id=757873
This commit is contained in:
parent
c3b28700d9
commit
a336181ef5
1 changed files with 2 additions and 0 deletions
|
@ -1665,6 +1665,8 @@ gst_ts_demux_stream_removed (MpegTSBase * base, MpegTSBaseStream * bstream)
|
|||
GST_DEBUG_OBJECT (stream->pad, "Removing pad");
|
||||
gst_element_remove_pad (GST_ELEMENT_CAST (base), stream->pad);
|
||||
stream->active = FALSE;
|
||||
} else {
|
||||
gst_object_unref (stream->pad);
|
||||
}
|
||||
stream->pad = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue