summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Tremblay <hexa00@gmail.com>2012-01-12 19:53:11 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2012-01-12 19:53:11 +0000
commitdf6de8fe0c4f7179281def3fed282573b5a3e546 (patch)
tree5736623dcc640a10e4457fa8e03d31e84bf4ebae
parentf460cea1d71fe60b7cf7803ae134e33253d9299a (diff)
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. https://bugzilla.gnome.org/show_bug.cgi?id=667444
-rw-r--r--libs/gst/base/gstbaseparse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c
index 64ba62fd20..93f917387d 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 |=
GST_BASE_PARSE_FRAME_PRIVATE_FLAG_NOALLOC;