mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
tsdemux: remove pads when resetting the element
Otherwise the pads will be there if it is restarted and the stream can be a completely different one. https://bugzilla.gnome.org/show_bug.cgi?id=734394
This commit is contained in:
parent
e93551d5b0
commit
52257fe538
1 changed files with 12 additions and 8 deletions
|
@ -1431,15 +1431,19 @@ gst_ts_demux_stream_removed (MpegTSBase * base, MpegTSBaseStream * bstream)
|
|||
if (stream->pad) {
|
||||
gst_flow_combiner_remove_pad (GST_TS_DEMUX_CAST (base)->flowcombiner,
|
||||
stream->pad);
|
||||
if (stream->active && gst_pad_is_active (stream->pad)) {
|
||||
if (stream->active) {
|
||||
|
||||
if (gst_pad_is_active (stream->pad)) {
|
||||
/* Flush out all data */
|
||||
GST_DEBUG_OBJECT (stream->pad, "Flushing out pending data");
|
||||
gst_ts_demux_push_pending_data ((GstTSDemux *) base, stream);
|
||||
|
||||
GST_DEBUG_OBJECT (stream->pad, "Pushing out EOS");
|
||||
gst_pad_push_event (stream->pad, gst_event_new_eos ());
|
||||
GST_DEBUG_OBJECT (stream->pad, "Deactivating and removing pad");
|
||||
gst_pad_set_active (stream->pad, FALSE);
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (stream->pad, "Removing pad");
|
||||
gst_element_remove_pad (GST_ELEMENT_CAST (base), stream->pad);
|
||||
stream->active = FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue