diff options
author | Etienne Peron <etienne.peron@parrot.com> | 2015-06-10 14:18:00 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-11-11 15:32:30 +0100 |
commit | a336181ef5bba20b832fb3db6493ac737beb4bf2 (patch) | |
tree | 3e199c1fc0e051c0920b97b166802f5a3cfa681e /gst/mpegtsdemux/tsdemux.c | |
parent | c3b28700d94b30f3ea06d799fcc55396aaf72cb5 (diff) | |
download | gstreamer-plugins-bad-a336181ef5bba20b832fb3db6493ac737beb4bf2.tar.gz |
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
Diffstat (limited to 'gst/mpegtsdemux/tsdemux.c')
-rw-r--r-- | gst/mpegtsdemux/tsdemux.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c index 6b14a4f02..085b83e10 100644 --- a/gst/mpegtsdemux/tsdemux.c +++ b/gst/mpegtsdemux/tsdemux.c @@ -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; } |