From b5620e12413c85d1881b1a0d8ce8c09c3d6fd869 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Thu, 5 Nov 2009 15:42:09 +0100 Subject: [PATCH] gdpdepay: Clear adapter on flush and state change Fixes #600469 --- gst/gdp/gstgdpdepay.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gst/gdp/gstgdpdepay.c b/gst/gdp/gstgdpdepay.c index 88ea6c0..a72cc30 100644 --- a/gst/gdp/gstgdpdepay.c +++ b/gst/gdp/gstgdpdepay.c @@ -160,8 +160,13 @@ gst_gdp_depay_sink_event (GstPad * pad, GstEvent * event) switch (GST_EVENT_TYPE (event)) { case GST_EVENT_FLUSH_START: + /* forward flush start */ + res = gst_pad_push_event (this->srcpad, event); + break; case GST_EVENT_FLUSH_STOP: - /* forward flush start and stop */ + /* clear adapter on flush */ + gst_adapter_clear (this->adapter); + /* forward flush stop */ res = gst_pad_push_event (this->srcpad, event); break; case GST_EVENT_EOS: @@ -458,6 +463,7 @@ gst_gdp_depay_change_state (GstElement * element, GstStateChange transition) gst_caps_unref (this->caps); this->caps = NULL; } + gst_adapter_clear (this->adapter); break; default: break; -- 2.7.4