summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--ext/flac/gstflacdec.c13
2 files changed, 16 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d6807345..558841a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-05-02 Sebastian Dröge <slomo@circular-chaos.org>
+
+ * ext/flac/gstflacdec.c: (gst_flac_dec_loop):
+ Correctly post an error on the bus if something went wrong in the loop
+ function. This fixes a few cases where the task was paused and nothing
+ happened anymore.
+
2007-05-02 Wim Taymans <wim@fluendo.com>
* gst/rtsp/test.c: (main):
diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c
index 1cf238ea..4da09eff 100644
--- a/ext/flac/gstflacdec.c
+++ b/ext/flac/gstflacdec.c
@@ -52,6 +52,7 @@
#include <string.h>
#include "gstflacdec.h"
+#include <gst/gst-i18n-plugin.h>
#include <gst/gsttagsetter.h>
#include <gst/tag/tag.h>
@@ -931,10 +932,14 @@ analyze_state:
case FLAC__SEEKABLE_STREAM_DECODER_SEEKING:{
GST_DEBUG_OBJECT (flacdec, "everything ok");
- if (flacdec->last_flow != GST_FLOW_OK &&
- flacdec->last_flow != GST_FLOW_NOT_LINKED) {
- GST_DEBUG_OBJECT (flacdec, "last_flow return was %s, pausing",
- gst_flow_get_name (flacdec->last_flow));
+ if (GST_FLOW_IS_FATAL (flacdec->last_flow) ||
+ flacdec->last_flow == GST_FLOW_NOT_LINKED) {
+ GST_ELEMENT_ERROR (flacdec, STREAM, FAILED,
+ (_("Internal data stream error.")),
+ ("stream stopped, reason %s",
+ gst_flow_get_name (flacdec->last_flow)));
+ goto eos_and_pause;
+ } else if (flacdec->last_flow != GST_FLOW_OK) {
goto pause;
}