[0.10] gstreamer: baseparse: clear adapter in reset so baseparse is reusable

Tim Müller tpm at kemper.freedesktop.org
Tue Jan 17 17:27:00 PST 2012

Module: gstreamer
Branch: 0.10
Commit: f07376a6d81f99ac61b7f79b3660a4475b9fbb9a
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=f07376a6d81f99ac61b7f79b3660a4475b9fbb9a

Author: Antoine Tremblay <hexa00 at gmail.com>
Date:   Thu Jan 12 19:53:11 2012 +0000

baseparse: clear adapter in reset so baseparse is reusable

GstBaseParse was not clearing its adapter on reset causing
problems when a pipeline went for example from PLAYING to NULL
state and then back to PLAYING again. The data from the last
stream would be used in the parser.



 libs/gst/base/gstbaseparse.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c
index 9da9b49..5776454 100644
--- a/libs/gst/base/gstbaseparse.c
+++ b/libs/gst/base/gstbaseparse.c
@@ -776,6 +776,9 @@ gst_base_parse_reset (GstBaseParse * parse)
   g_slist_free (parse->priv->pending_seeks);
   parse->priv->pending_seeks = NULL;
+  if (parse->priv->adapter)
+    gst_adapter_clear (parse->priv->adapter);
   /* we know it is not alloc'ed, but maybe other stuff to free, some day ... */
   parse->priv->frame._private_flags |=

More information about the gstreamer-commits mailing list