summaryrefslogtreecommitdiff
path: root/gst/mpegdemux
diff options
context:
space:
mode:
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2015-04-16 13:35:00 +0100
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2015-04-16 13:35:40 +0100
commitd84d803431c834cd30b8878da82409d29f56443f (patch)
treee6b2a105b7780274444dda0f1096af5e689f54e9 /gst/mpegdemux
parentcb0eaeadfd4fd7eb78d6c482bd1e2f76060493d8 (diff)
downloadgstreamer-plugins-bad-d84d803431c834cd30b8878da82409d29f56443f.tar.gz
mpegdemux: fix pad leak when not adding a new pad after no-more-pads
Diffstat (limited to 'gst/mpegdemux')
-rw-r--r--gst/mpegdemux/gstmpegdemux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c
index a59ad8da9..c5501902f 100644
--- a/gst/mpegdemux/gstmpegdemux.c
+++ b/gst/mpegdemux/gstmpegdemux.c
@@ -306,6 +306,8 @@ gst_ps_demux_reset (GstPsDemux * demux)
if (stream->pad && GST_PAD_PARENT (stream->pad)) {
gst_flow_combiner_remove_pad (demux->flowcombiner, stream->pad);
gst_element_remove_pad (GST_ELEMENT_CAST (demux), stream->pad);
+ } else {
+ gst_object_unref (stream->pad);
}
if (stream->pending_tags)
@@ -532,6 +534,7 @@ gst_ps_demux_get_stream (GstPsDemux * demux, gint id, gint type)
* add a whole new set of pads, drop old and no-more-pads again */
GST_DEBUG_OBJECT (demux,
"but already signalled no-more-pads; not adding");
+ gst_object_ref_sink (stream->pad);
}
demux->streams[id] = stream;