diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c index 6650d183ba..49bc03cc6d 100644 --- a/gst/wavparse/gstwavparse.c +++ b/gst/wavparse/gstwavparse.c @@ -2216,7 +2216,7 @@ pause: else if (wav->segment.rate < 0.0) wav->segment.position = wav->segment.start; } - if (wav->state == GST_WAVPARSE_START) { + if (wav->state == GST_WAVPARSE_START || !wav->caps) { GST_ELEMENT_ERROR (wav, STREAM, WRONG_TYPE, (NULL), ("No valid input found before end of stream")); gst_pad_push_event (wav->srcpad, gst_event_new_eos ()); @@ -2427,7 +2427,7 @@ gst_wavparse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) break; } case GST_EVENT_EOS: - if (wav->state == GST_WAVPARSE_START) { + if (wav->state == GST_WAVPARSE_START || !wav->caps) { GST_ELEMENT_ERROR (wav, STREAM, WRONG_TYPE, (NULL), ("No valid input found before end of stream")); } else {