diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2016-10-31 09:00:49 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-11-01 15:05:30 +0200 |
commit | 237d7ba4dcd4256b0c78e2bf395c1b3540db08da (patch) | |
tree | 3760d59d3fc5b536dba9c2ba2da38515b5cbd6e3 | |
parent | 61a7ba51551322c3220717a26e83aaced18a3901 (diff) | |
download | gstreamer-plugins-good-237d7ba4dcd4256b0c78e2bf395c1b3540db08da.tar.gz |
wavparse: Don't try to add srcpad if we don't know valid caps yet
Otherwise we'll run into an assertion on specially crafted files.
https://bugzilla.gnome.org/show_bug.cgi?id=773643
-rw-r--r-- | gst/wavparse/gstwavparse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c index 138ec1646..d953a6dc2 100644 --- a/gst/wavparse/gstwavparse.c +++ b/gst/wavparse/gstwavparse.c @@ -2226,7 +2226,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 ()); @@ -2439,7 +2439,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 { |