jpeg: set tags to NULL at init time and after freeing them

This commit is contained in:
Stefan Kost 2011-04-11 18:30:17 +03:00
parent b67454b44e
commit 3a4a0c492e
2 changed files with 5 additions and 2 deletions

View file

@ -880,7 +880,6 @@ gst_jpeg_parse_push_buffer (GstJpegParse * parse, guint len)
parse->priv->caps_framerate_numerator = parse->priv->framerate_numerator; parse->priv->caps_framerate_numerator = parse->priv->framerate_numerator;
parse->priv->caps_framerate_denominator = parse->priv->caps_framerate_denominator =
parse->priv->framerate_denominator; parse->priv->framerate_denominator;
parse->priv->tags = NULL;
} }
GST_BUFFER_TIMESTAMP (outbuf) = parse->priv->next_ts; GST_BUFFER_TIMESTAMP (outbuf) = parse->priv->next_ts;
@ -1043,8 +1042,10 @@ gst_jpeg_parse_change_state (GstElement * element, GstStateChange transition)
switch (transition) { switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY: case GST_STATE_CHANGE_PAUSED_TO_READY:
gst_adapter_clear (parse->priv->adapter); gst_adapter_clear (parse->priv->adapter);
if (parse->priv->tags) if (parse->priv->tags) {
gst_tag_list_free (parse->priv->tags); gst_tag_list_free (parse->priv->tags);
parse->priv->tags = NULL;
}
break; break;
default: default:
break; break;

View file

@ -359,6 +359,8 @@ setup_wrappercamerabinsrc_videotestsrc (void)
gst_bus_add_watch (bus, (GstBusFunc) capture_bus_cb, main_loop); gst_bus_add_watch (bus, (GstBusFunc) capture_bus_cb, main_loop);
gst_object_unref (bus); gst_object_unref (bus);
tags_found = NULL;
GST_INFO ("init finished"); GST_INFO ("init finished");
} }