auparse: avoid hanging on invalid short input

... as in such case there is no srcpad yet on which to forward EOS.
This commit is contained in:
Mark Nauwelaerts 2011-07-19 12:05:51 +02:00
parent 14b9fb7be6
commit 1880c4145e

View file

@ -749,6 +749,12 @@ gst_au_parse_sink_event (GstPad * pad, GstEvent * event)
gst_event_unref (event);
break;
}
case GST_EVENT_EOS:
if (!auparse->srcpad) {
GST_ELEMENT_ERROR (auparse, STREAM, WRONG_TYPE,
("No valid input found before end of stream"), (NULL));
}
/* fall-through */
default:
ret = gst_pad_event_default (pad, event);
break;