mp3parse: fix non-flushing seek
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Thu, 26 Nov 2009 14:54:45 +0000 (15:54 +0100)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Thu, 26 Nov 2009 14:58:57 +0000 (15:58 +0100)
Specifically, in addition to clearing lots of variables/offsets
when receiving newsegment, also clear leftover data to match.

gst/mpegaudioparse/gstmpegaudioparse.c

index 56eb369..160adc8 100644 (file)
@@ -559,6 +559,8 @@ gst_mp3parse_sink_event (GstPad * pad, GstEvent * event)
       mp3parse->pending_ts = GST_CLOCK_TIME_NONE;
       mp3parse->tracked_offset = 0;
       mp3parse->sync_offset = 0;
+      /* also clear leftover data if clearing so much state */
+      gst_adapter_clear (mp3parse->adapter);
 
       gst_event_parse_new_segment_full (event, &update, &rate, &applied_rate,
           &format, &start, &stop, &pos);