summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2007-11-21 09:45:41 +0000
committerWim Taymans <wim.taymans@gmail.com>2007-11-21 09:45:41 +0000
commit1b2fa58301a32618257032a6350342205446c9cb (patch)
tree03607808ddaf7de9e15eb329d54c07f7c7ae67cf
parent6691ae01e2b7a491cadb609d7b09471ce21d24cb (diff)
downloadgst-plugins-bad-1b2fa58301a32618257032a6350342205446c9cb.tar.gz
gst-plugins-bad-1b2fa58301a32618257032a6350342205446c9cb.tar.bz2
gst-plugins-bad-1b2fa58301a32618257032a6350342205446c9cb.zip
ext/faac/gstfaac.c: Don't try to flush the decoder on EOS when it was not initialized.
Original commit message from CVS: * ext/faac/gstfaac.c: (gst_faac_sink_event): Don't try to flush the decoder on EOS when it was not initialized. Fixes #498667
-rw-r--r--ChangeLog6
-rw-r--r--ext/faac/gstfaac.c11
2 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index b0d93e67..2fc1e15c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-21 Wim Taymans <wim.taymans@gmail.com>
+
+ * ext/faac/gstfaac.c: (gst_faac_sink_event):
+ Don't try to flush the decoder on EOS when it was not initialized.
+ Fixes #498667
+
2007-11-21 Julien Moutte <julien@fluendo.com>
* ext/sdl/sdlaudiosink.c: (gst_sdlaudio_sink_write): Fix build
diff --git a/ext/faac/gstfaac.c b/ext/faac/gstfaac.c
index 143cc3b8..eae5849e 100644
--- a/ext/faac/gstfaac.c
+++ b/ext/faac/gstfaac.c
@@ -453,9 +453,13 @@ gst_faac_sink_event (GstPad * pad, GstEvent * event)
{
GstBuffer *outbuf;
+ if (!faac->handle)
+ ret = FALSE;
+ else
+ ret = TRUE;
+
/* flush first */
- ret = TRUE;
- do {
+ while (ret) {
if (gst_pad_alloc_buffer_and_set_caps (faac->srcpad,
GST_BUFFER_OFFSET_NONE, faac->bytes,
GST_PAD_CAPS (faac->srcpad), &outbuf) == GST_FLOW_OK) {
@@ -472,8 +476,7 @@ gst_faac_sink_event (GstPad * pad, GstEvent * event)
ret = FALSE;
}
}
- } while (ret);
-
+ }
ret = gst_pad_event_default (pad, event);
break;
}