wavparse: push mode; add pad if needed so downstream gets EOS

This commit is contained in:
Mark Nauwelaerts 2009-08-11 13:54:56 +02:00
parent 79f69bbf72
commit efb5d1b545

View file

@ -2197,8 +2197,14 @@ gst_wavparse_sink_event (GstPad * pad, GstEvent * event)
break; break;
} }
case GST_EVENT_EOS: case GST_EVENT_EOS:
/* stream leftover data in current segment */ /* add pad if needed so EOS is seen downstream */
gst_wavparse_flush_data (wav); 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 */ /* fall-through */
case GST_EVENT_FLUSH_STOP: case GST_EVENT_FLUSH_STOP:
gst_adapter_clear (wav->adapter); gst_adapter_clear (wav->adapter);