From 9fe72b5da366e087998b9689d20f24db29ab311f Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Thu, 26 Nov 2009 15:54:45 +0100 Subject: [PATCH] mp3parse: fix non-flushing seek Specifically, in addition to clearing lots of variables/offsets when receiving newsegment, also clear leftover data to match. --- gst/mpegaudioparse/gstmpegaudioparse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/mpegaudioparse/gstmpegaudioparse.c b/gst/mpegaudioparse/gstmpegaudioparse.c index 56eb3692f5..160adc8ddc 100644 --- a/gst/mpegaudioparse/gstmpegaudioparse.c +++ b/gst/mpegaudioparse/gstmpegaudioparse.c @@ -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);