aiffparse: make sure we have data before handling sink event

Check AIFF_PARSE_DATA is True before handling sink event, if not goto exit.
This commit is contained in:
Luis de Bethencourt 2015-02-06 15:10:55 +00:00
parent dc2c4840f9
commit a4baabb48d

View file

@ -1805,6 +1805,11 @@ gst_aiff_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
GST_DEBUG_OBJECT (aiff, "received segment %" GST_SEGMENT_FORMAT, GST_DEBUG_OBJECT (aiff, "received segment %" GST_SEGMENT_FORMAT,
&segment); &segment);
if (aiff->state != AIFF_PARSE_DATA) {
GST_DEBUG_OBJECT (aiff, "still starting, eating event");
goto exit;
}
/* now we are either committed to TIME or BYTE format, /* now we are either committed to TIME or BYTE format,
* and we only expect a BYTE segment, e.g. following a seek */ * and we only expect a BYTE segment, e.g. following a seek */
if (segment.format == GST_FORMAT_BYTES) { if (segment.format == GST_FORMAT_BYTES) {