mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
playbin2: Avoid resetting playsink when not needed
When we don't have specific {audio|video|text}-sink properties, don't set them on playsink when reconfiguring. If we do that, we end up setting the previous configured sink to GST_STATE_NULL resulting in any potentially pending push being returned with GST_FLOW_WRONG_STATE which will cause the upstream elements to silently stop. https://bugzilla.gnome.org/show_bug.cgi?id=655279
This commit is contained in:
parent
2db389f775
commit
059db89633
1 changed files with 18 additions and 12 deletions
|
@ -2787,20 +2787,26 @@ no_more_pads_cb (GstElement * decodebin, GstSourceGroup * group)
|
|||
/* if we have custom sinks, configure them now */
|
||||
GST_SOURCE_GROUP_LOCK (group);
|
||||
|
||||
GST_INFO_OBJECT (playbin, "setting custom audio sink %" GST_PTR_FORMAT,
|
||||
group->audio_sink);
|
||||
gst_play_sink_set_sink (playbin->playsink, GST_PLAY_SINK_TYPE_AUDIO,
|
||||
group->audio_sink);
|
||||
if (group->audio_sink) {
|
||||
GST_INFO_OBJECT (playbin, "setting custom audio sink %" GST_PTR_FORMAT,
|
||||
group->audio_sink);
|
||||
gst_play_sink_set_sink (playbin->playsink, GST_PLAY_SINK_TYPE_AUDIO,
|
||||
group->audio_sink);
|
||||
}
|
||||
|
||||
GST_INFO_OBJECT (playbin, "setting custom video sink %" GST_PTR_FORMAT,
|
||||
group->video_sink);
|
||||
gst_play_sink_set_sink (playbin->playsink, GST_PLAY_SINK_TYPE_VIDEO,
|
||||
group->video_sink);
|
||||
if (group->video_sink) {
|
||||
GST_INFO_OBJECT (playbin, "setting custom video sink %" GST_PTR_FORMAT,
|
||||
group->video_sink);
|
||||
gst_play_sink_set_sink (playbin->playsink, GST_PLAY_SINK_TYPE_VIDEO,
|
||||
group->video_sink);
|
||||
}
|
||||
|
||||
GST_INFO_OBJECT (playbin, "setting custom text sink %" GST_PTR_FORMAT,
|
||||
playbin->text_sink);
|
||||
gst_play_sink_set_sink (playbin->playsink, GST_PLAY_SINK_TYPE_TEXT,
|
||||
playbin->text_sink);
|
||||
if (playbin->text_sink) {
|
||||
GST_INFO_OBJECT (playbin, "setting custom text sink %" GST_PTR_FORMAT,
|
||||
playbin->text_sink);
|
||||
gst_play_sink_set_sink (playbin->playsink, GST_PLAY_SINK_TYPE_TEXT,
|
||||
playbin->text_sink);
|
||||
}
|
||||
|
||||
GST_SOURCE_GROUP_UNLOCK (group);
|
||||
|
||||
|
|
Loading…
Reference in a new issue