From 925150953da6a9bc383940528fd4a6769a53b62d 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 88ea6c0cf8..a72cc30328 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.34.1