From f638d690fe173b9d9d7f10a0146057480f9a8eaf Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 2 Jun 2008 17:06:34 +0000 Subject: [PATCH] ext/faad/gstfaad.c: Always drain before activating the new segment. Original commit message from CVS: * ext/faad/gstfaad.c: (gst_faad_sink_event): Always drain before activating the new segment. --- ChangeLog | 5 +++++ ext/faad/gstfaad.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c9c451740f..6deea0a8e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-02 Wim Taymans + + * ext/faad/gstfaad.c: (gst_faad_sink_event): + Always drain before activating the new segment. + 2008-06-02 Sebastian Dröge * gst/interleave/interleave.c: (gst_interleave_pad_get_type), diff --git a/ext/faad/gstfaad.c b/ext/faad/gstfaad.c index 178ff6429a..f1ba39f655 100644 --- a/ext/faad/gstfaad.c +++ b/ext/faad/gstfaad.c @@ -896,6 +896,9 @@ gst_faad_sink_event (GstPad * pad, GstEvent * event) gst_event_parse_new_segment (event, &is_update, &rate, &fmt, &start, &end, &base); + /* drain queued buffers before we activate the new segment */ + gst_faad_drain (faad); + if (fmt == GST_FORMAT_TIME) { GST_DEBUG ("Got NEWSEGMENT event in GST_FORMAT_TIME, passing on (%" GST_TIME_FORMAT " - %" GST_TIME_FORMAT ")", GST_TIME_ARGS (start), @@ -921,9 +924,6 @@ gst_faad_sink_event (GstPad * pad, GstEvent * event) } gst_event_unref (event); - /* drain queued buffers before we activate the new segment */ - gst_faad_drain (faad); - event = gst_event_new_new_segment (is_update, rate, GST_FORMAT_TIME, new_start, new_end, new_start);