summaryrefslogtreecommitdiffstats
path: root/ext/flac
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2007-05-02 17:08:09 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2007-05-02 17:08:09 +0000
commitb64fd034a58ad433ad489d2748a72abfc3ef0d6a (patch)
treeb72d6130bd02bdc47727f80a3da624435681e091 /ext/flac
parent2c47f4d65806c2f48d724863ff8b4f0a0f9d9964 (diff)
ext/flac/gstflacdec.c: Correctly post an error on the bus if something went wrong in the loop function. This fixes a ...
Original commit message from CVS: * 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.
Diffstat (limited to 'ext/flac')
-rw-r--r--ext/flac/gstflacdec.c13
1 files changed, 9 insertions, 4 deletions
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;
}