mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
urisourcebin: Streamline demuxer removal
And since remove_source also removes the dmeuxer, we no longer need to call it in addition Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2784>
This commit is contained in:
parent
577febc29e
commit
e8f9e17744
1 changed files with 2 additions and 11 deletions
|
@ -2233,12 +2233,8 @@ remove_source (GstURISourceBin * urisrc)
|
||||||
urisrc->out_slots = NULL;
|
urisrc->out_slots = NULL;
|
||||||
GST_URI_SOURCE_BIN_UNLOCK (urisrc);
|
GST_URI_SOURCE_BIN_UNLOCK (urisrc);
|
||||||
|
|
||||||
if (urisrc->demuxer) {
|
if (urisrc->demuxer)
|
||||||
GST_DEBUG_OBJECT (urisrc, "removing old adaptive demux element");
|
remove_demuxer (urisrc);
|
||||||
gst_element_set_state (urisrc->demuxer, GST_STATE_NULL);
|
|
||||||
gst_bin_remove (GST_BIN_CAST (urisrc), urisrc->demuxer);
|
|
||||||
urisrc->demuxer = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* is called when a dynamic source element created a new pad. */
|
/* is called when a dynamic source element created a new pad. */
|
||||||
|
@ -2305,9 +2301,6 @@ setup_source (GstURISourceBin * urisrc)
|
||||||
if (is_live_source (urisrc->source))
|
if (is_live_source (urisrc->source))
|
||||||
urisrc->is_stream = FALSE;
|
urisrc->is_stream = FALSE;
|
||||||
|
|
||||||
/* remove the old demuxer now, if any */
|
|
||||||
remove_demuxer (urisrc);
|
|
||||||
|
|
||||||
/* see if the source element emits raw audio/video all by itself,
|
/* see if the source element emits raw audio/video all by itself,
|
||||||
* if so, we can create streams for the pads and be done with it.
|
* if so, we can create streams for the pads and be done with it.
|
||||||
* Also check that is has source pads, if not, we assume it will
|
* Also check that is has source pads, if not, we assume it will
|
||||||
|
@ -3001,7 +2994,6 @@ gst_uri_source_bin_change_state (GstElement * element,
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||||
GST_DEBUG ("paused to ready");
|
GST_DEBUG ("paused to ready");
|
||||||
remove_demuxer (urisrc);
|
|
||||||
remove_source (urisrc);
|
remove_source (urisrc);
|
||||||
g_list_free_full (urisrc->buffering_status,
|
g_list_free_full (urisrc->buffering_status,
|
||||||
(GDestroyNotify) gst_message_unref);
|
(GDestroyNotify) gst_message_unref);
|
||||||
|
@ -3011,7 +3003,6 @@ gst_uri_source_bin_change_state (GstElement * element,
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||||
GST_DEBUG ("ready to null");
|
GST_DEBUG ("ready to null");
|
||||||
remove_demuxer (urisrc);
|
|
||||||
remove_source (urisrc);
|
remove_source (urisrc);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue