From a4baabb48d252214d3833b502c7903d9f15f3502 Mon Sep 17 00:00:00 2001 From: Luis de Bethencourt Date: Fri, 6 Feb 2015 15:10:55 +0000 Subject: [PATCH] aiffparse: make sure we have data before handling sink event Check AIFF_PARSE_DATA is True before handling sink event, if not goto exit. --- gst/aiff/aiffparse.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gst/aiff/aiffparse.c b/gst/aiff/aiffparse.c index 78854ae..3d9756c 100644 --- a/gst/aiff/aiffparse.c +++ b/gst/aiff/aiffparse.c @@ -1805,6 +1805,11 @@ gst_aiff_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) GST_DEBUG_OBJECT (aiff, "received segment %" GST_SEGMENT_FORMAT, &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, * and we only expect a BYTE segment, e.g. following a seek */ if (segment.format == GST_FORMAT_BYTES) { -- 2.7.4