[gst-cvs] gst-plugins-base: playbin2: when no uri is set, post an error message
Tim Mueller
tpm at kemper.freedesktop.org
Sat Jan 30 07:41:54 PST 2010
Module: gst-plugins-base
Branch: master
Commit: 16601b09fe8704ba0f80465fe788a36d17caff91
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=16601b09fe8704ba0f80465fe788a36d17caff91
Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date: Fri Jan 29 13:56:05 2010 +0000
playbin2: when no uri is set, post an error message
When no uri is set, don't just return STATE_CHANGE_FAILURE from the
state change function, but actually post an error message.
---
gst/playback/gstplaybin2.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c
index 10b477b..c143c51 100644
--- a/gst/playback/gstplaybin2.c
+++ b/gst/playback/gstplaybin2.c
@@ -2473,8 +2473,8 @@ _playsink_sink_event_probe_cb (GstPad * pad, GstEvent * event,
if (format != GST_FORMAT_TIME)
data->group->selector[data->type].group_start_accum = GST_CLOCK_TIME_NONE;
- else if (!GST_CLOCK_TIME_IS_VALID (data->group->selector[data->
- type].group_start_accum))
+ else if (!GST_CLOCK_TIME_IS_VALID (data->group->selector[data->type].
+ group_start_accum))
data->group->selector[data->type].group_start_accum = segment->accum;
} else if (GST_EVENT_TYPE (event) == GST_EVENT_FLUSH_STOP) {
gst_segment_init (&data->playbin->segments[index], GST_FORMAT_UNDEFINED);
@@ -3484,6 +3484,8 @@ setup_next_source (GstPlayBin * playbin, GstState target)
no_next_group:
{
GST_DEBUG_OBJECT (playbin, "no next group");
+ if (target == GST_STATE_READY && new_group && new_group->uri == NULL)
+ GST_ELEMENT_ERROR (playbin, RESOURCE, NOT_FOUND, ("No URI set"), (NULL));
GST_PLAY_BIN_UNLOCK (playbin);
return FALSE;
}
More information about the Gstreamer-commits
mailing list