mpeg4videoparse: don't leak the config data

Clear the config data when going to READY or when disposed.
Fixes #581427
This commit is contained in:
Arnout Vandecappelle 2009-05-05 16:54:39 +02:00 committed by Wim Taymans
parent 46139253bc
commit 9542d9e251

View file

@ -726,6 +726,10 @@ gst_mpeg4vparse_cleanup (GstMpeg4VParse * parse)
if (parse->adapter) {
gst_adapter_clear (parse->adapter);
}
if (parse->config != NULL) {
gst_buffer_unref (parse->config);
parse->config = NULL;
}
parse->state = PARSE_NEED_START;
parse->have_config = FALSE;
@ -760,6 +764,10 @@ gst_mpeg4vparse_dispose (GObject * object)
g_object_unref (parse->adapter);
parse->adapter = NULL;
}
if (parse->config != NULL) {
gst_buffer_unref (parse->config);
parse->config = NULL;
}
GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object));
}