summaryrefslogtreecommitdiff
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-16 09:17:34 +0200
commit7255e484e0da69351bc48de208df53c72358e886 (patch)
tree9fd7ac873abd8706f45ddfb1f08be8530321381f
parent63f500dfff9d7b97ca6e6f645510d58b4eb374d0 (diff)
downloadgstreamer-plugins-bad-7255e484e0da69351bc48de208df53c72358e886.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
-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 8971bc828..566b7c558 100644
--- a/gst/mpegtsdemux/tsdemux.c
+++ b/gst/mpegtsdemux/tsdemux.c
@@ -1488,6 +1488,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;
}