From e618365a1989f298ee74bf38212bbe07cb92e684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 27 Aug 2010 18:58:23 +0200 Subject: gme: Post an error message on the bus for fatal errors Also don't use GST_FLOW_IS_FATAL(). --- ext/gme/gstgme.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ext/gme') diff --git a/ext/gme/gstgme.c b/ext/gme/gstgme.c index 2d7b2a58b..58df54cb1 100644 --- a/ext/gme/gstgme.c +++ b/ext/gme/gstgme.c @@ -395,7 +395,13 @@ gst_gme_play (GstPad * pad) gst_pad_pause_task (pad); - if (GST_FLOW_IS_FATAL (flow_return) || flow_return == GST_FLOW_NOT_LINKED) { + if (flow_return == GST_FLOW_UNEXPECTED) { + gst_pad_push_event (pad, gst_event_new_eos ()); + } else if (flow_return < GST_FLOW_UNEXPECTED + || flow_return == GST_FLOW_NOT_LINKED) { + GST_ELEMENT_ERROR (gme, STREAM, FAILED, ("Internal data stream error."), + ("stream stopped, reason %s", gst_flow_get_name (flow_return))); + gst_pad_push_event (pad, gst_event_new_eos ()); } } -- cgit v1.2.1