mpegdemux: fix pad leak when not adding a new pad after no-more-pads

This commit is contained in:
Vincent Penquerc'h 2015-04-16 13:35:00 +01:00
parent cb0eaeadfd
commit d84d803431

View file

@ -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;