mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-11 19:06:33 +00:00
wavparse: Post an error message if EOS happens before valid input is found
Fixes bug #627341.
This commit is contained in:
parent
44a5cb4313
commit
95f5b494fa
1 changed files with 10 additions and 0 deletions
|
@ -2045,6 +2045,11 @@ pause:
|
||||||
wav->first = FALSE;
|
wav->first = FALSE;
|
||||||
gst_wavparse_add_src_pad (wav, NULL);
|
gst_wavparse_add_src_pad (wav, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wav->state == GST_WAVPARSE_START)
|
||||||
|
GST_ELEMENT_ERROR (wav, STREAM, WRONG_TYPE,
|
||||||
|
("No valid input found before end of stream"), (NULL));
|
||||||
|
|
||||||
/* perform EOS logic */
|
/* perform EOS logic */
|
||||||
if (wav->segment.flags & GST_SEEK_FLAG_SEGMENT) {
|
if (wav->segment.flags & GST_SEEK_FLAG_SEGMENT) {
|
||||||
GstClockTime stop;
|
GstClockTime stop;
|
||||||
|
@ -2244,6 +2249,11 @@ gst_wavparse_sink_event (GstPad * pad, GstEvent * event)
|
||||||
/* stream leftover data in current segment */
|
/* stream leftover data in current segment */
|
||||||
gst_wavparse_flush_data (wav);
|
gst_wavparse_flush_data (wav);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wav->state == GST_WAVPARSE_START)
|
||||||
|
GST_ELEMENT_ERROR (wav, STREAM, WRONG_TYPE,
|
||||||
|
("No valid input found before end of stream"), (NULL));
|
||||||
|
|
||||||
/* fall-through */
|
/* fall-through */
|
||||||
case GST_EVENT_FLUSH_STOP:
|
case GST_EVENT_FLUSH_STOP:
|
||||||
gst_adapter_clear (wav->adapter);
|
gst_adapter_clear (wav->adapter);
|
||||||
|
|
Loading…
Reference in a new issue