Commit f68b6c26 authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

playbin: Change sink ownership handling to be a bit more sane

playbin will now only activate the sinks in a single place and
will never change the states of any sinks that are owned by
playsink.

Also handle text-sinks the same way as audio/video sinks inside
playbin.
parent 27762a9a
This diff is collapsed.
......@@ -3226,6 +3226,8 @@ gst_play_sink_do_reconfigure (GstPlaySink * playsink)
playsink->colorbalance_element = NULL;
GST_OBJECT_UNLOCK (playsink);
if (playsink->video_sink)
gst_element_set_state (playsink->video_sink, GST_STATE_NULL);
}
if (need_audio) {
......@@ -3288,6 +3290,9 @@ gst_play_sink_do_reconfigure (GstPlaySink * playsink)
playsink->audiochain = gen_audio_chain (playsink, raw);
}
if (!playsink->audiochain)
goto no_chain;
if (!playsink->audio_sinkpad_stream_synchronizer) {
GValue item = { 0, };
GstIterator *it;
......@@ -3353,6 +3358,9 @@ gst_play_sink_do_reconfigure (GstPlaySink * playsink)
add_chain (GST_PLAY_CHAIN (playsink->audiochain), FALSE);
activate_chain (GST_PLAY_CHAIN (playsink->audiochain), FALSE);
}
if (playsink->audio_sink)
gst_element_set_state (playsink->audio_sink, GST_STATE_NULL);
}
if (need_vis) {
......@@ -3500,6 +3508,9 @@ gst_play_sink_do_reconfigure (GstPlaySink * playsink)
if (playsink->text_pad && !playsink->textchain)
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->text_pad), NULL);
if (playsink->text_sink)
gst_element_set_state (playsink->text_sink, GST_STATE_NULL);
}
update_av_offset (playsink);
do_async_done (playsink);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment