mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-03 15:06:34 +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;
|
||||
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 */
|
||||
if (wav->segment.flags & GST_SEEK_FLAG_SEGMENT) {
|
||||
GstClockTime stop;
|
||||
|
@ -2244,6 +2249,11 @@ gst_wavparse_sink_event (GstPad * pad, GstEvent * event)
|
|||
/* stream leftover data in current segment */
|
||||
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 */
|
||||
case GST_EVENT_FLUSH_STOP:
|
||||
gst_adapter_clear (wav->adapter);
|
||||
|
|
Loading…
Reference in a new issue