mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
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
This commit is contained in:
parent
1dc1ee2ae3
commit
9ba6fb86d8
1 changed files with 2 additions and 2 deletions
|
@ -2216,7 +2216,7 @@ pause:
|
||||||
else if (wav->segment.rate < 0.0)
|
else if (wav->segment.rate < 0.0)
|
||||||
wav->segment.position = wav->segment.start;
|
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),
|
GST_ELEMENT_ERROR (wav, STREAM, WRONG_TYPE, (NULL),
|
||||||
("No valid input found before end of stream"));
|
("No valid input found before end of stream"));
|
||||||
gst_pad_push_event (wav->srcpad, gst_event_new_eos ());
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case GST_EVENT_EOS:
|
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),
|
GST_ELEMENT_ERROR (wav, STREAM, WRONG_TYPE, (NULL),
|
||||||
("No valid input found before end of stream"));
|
("No valid input found before end of stream"));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue