summaryrefslogtreecommitdiffstats
path: root/gst/wavparse
diff options
context:
space:
mode:
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2009-08-11 13:54:56 +0200
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2009-08-31 16:50:00 +0200
commitefb5d1b5452ec34b75dc470dbec83675258142bb (patch)
tree0218fd462579b307d20c8f64cfd5ecb6aead1335 /gst/wavparse
parent79f69bbf72e45b25e655c68f5c0855fdb9287e14 (diff)
wavparse: push mode; add pad if needed so downstream gets EOS
Diffstat (limited to 'gst/wavparse')
-rw-r--r--gst/wavparse/gstwavparse.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c
index 7beb7327..23e03869 100644
--- a/gst/wavparse/gstwavparse.c
+++ b/gst/wavparse/gstwavparse.c
@@ -2197,8 +2197,14 @@ gst_wavparse_sink_event (GstPad * pad, GstEvent * event)
break;
}
case GST_EVENT_EOS:
- /* stream leftover data in current segment */
- gst_wavparse_flush_data (wav);
+ /* add pad if needed so EOS is seen downstream */
+ if (G_UNLIKELY (wav->first)) {
+ wav->first = FALSE;
+ gst_wavparse_add_src_pad (wav, NULL);
+ } else {
+ /* stream leftover data in current segment */
+ gst_wavparse_flush_data (wav);
+ }
/* fall-through */
case GST_EVENT_FLUSH_STOP:
gst_adapter_clear (wav->adapter);