summaryrefslogtreecommitdiff
path: root/gst/mpegtsdemux/tsdemux.c
diff options
context:
space:
mode:
authorEtienne Peron <etienne.peron@parrot.com>2015-06-10 14:18:00 +0200
committerSebastian Dröge <sebastian@centricular.com>2015-11-11 15:32:30 +0100
commita336181ef5bba20b832fb3db6493ac737beb4bf2 (patch)
tree3e199c1fc0e051c0920b97b166802f5a3cfa681e /gst/mpegtsdemux/tsdemux.c
parentc3b28700d94b30f3ea06d799fcc55396aaf72cb5 (diff)
downloadgstreamer-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.c2
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;
}