mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
playbin: When activating a fixed sink, proxy error messages too
If activating a fixed sink fails, everything will fail later anyway and we can just error out early.
This commit is contained in:
parent
44352deadb
commit
4465741222
1 changed files with 16 additions and 1 deletions
|
@ -3926,7 +3926,22 @@ static GstBusSyncReply
|
||||||
activate_sink_bus_handler (GstBus * bus, GstMessage * msg, GstPlayBin * playbin)
|
activate_sink_bus_handler (GstBus * bus, GstMessage * msg, GstPlayBin * playbin)
|
||||||
{
|
{
|
||||||
if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
|
if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
|
||||||
gst_message_unref (msg);
|
/* Only proxy errors from a fixed sink. If that fails we can just error out
|
||||||
|
* early as stuff will fail later anyway */
|
||||||
|
if (playbin->audio_sink
|
||||||
|
&& gst_object_has_ancestor (GST_MESSAGE_SRC (msg),
|
||||||
|
GST_OBJECT_CAST (playbin->audio_sink)))
|
||||||
|
gst_element_post_message (GST_ELEMENT_CAST (playbin), msg);
|
||||||
|
else if (playbin->video_sink
|
||||||
|
&& gst_object_has_ancestor (GST_MESSAGE_SRC (msg),
|
||||||
|
GST_OBJECT_CAST (playbin->video_sink)))
|
||||||
|
gst_element_post_message (GST_ELEMENT_CAST (playbin), msg);
|
||||||
|
else if (playbin->text_sink
|
||||||
|
&& gst_object_has_ancestor (GST_MESSAGE_SRC (msg),
|
||||||
|
GST_OBJECT_CAST (playbin->text_sink)))
|
||||||
|
gst_element_post_message (GST_ELEMENT_CAST (playbin), msg);
|
||||||
|
else
|
||||||
|
gst_message_unref (msg);
|
||||||
} else {
|
} else {
|
||||||
gst_element_post_message (GST_ELEMENT_CAST (playbin), msg);
|
gst_element_post_message (GST_ELEMENT_CAST (playbin), msg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue