mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
mpegdemux: fix pad leak when not adding a new pad after no-more-pads
This commit is contained in:
parent
cb0eaeadfd
commit
d84d803431
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue