jpeg: set tags to NULL at init time and after freeing them
authorStefan Kost <ensonic@users.sf.net>
Mon, 11 Apr 2011 15:30:17 +0000 (18:30 +0300)
committerStefan Kost <ensonic@users.sf.net>
Mon, 11 Apr 2011 15:30:17 +0000 (18:30 +0300)
gst/jpegformat/gstjpegparse.c
tests/check/elements/camerabin2.c

index 47114465b7c2d1ea4941dc175051534c479420e4..cb10ef88b976fc7165d4970e0cfef4282a4d651d 100644 (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_denominator =
         parse->priv->framerate_denominator;
-    parse->priv->tags = NULL;
   }
 
   GST_BUFFER_TIMESTAMP (outbuf) = parse->priv->next_ts;
@@ -1043,8 +1042,10 @@ gst_jpeg_parse_change_state (GstElement * element, GstStateChange transition)
   switch (transition) {
     case GST_STATE_CHANGE_PAUSED_TO_READY:
       gst_adapter_clear (parse->priv->adapter);
-      if (parse->priv->tags)
+      if (parse->priv->tags) {
         gst_tag_list_free (parse->priv->tags);
+        parse->priv->tags = NULL;
+      }
       break;
     default:
       break;
index d5032519f919c05df1b3b2d888d94406d802f9ee..55c3cc0db5c99f2bf2eb73715976e7222eaad272 100644 (file)
@@ -359,6 +359,8 @@ setup_wrappercamerabinsrc_videotestsrc (void)
   gst_bus_add_watch (bus, (GstBusFunc) capture_bus_cb, main_loop);
   gst_object_unref (bus);
 
+  tags_found = NULL;
+
   GST_INFO ("init finished");
 }