tests: fix caps leak in jpegparse unit test

This commit is contained in:
Mark Nauwelaerts 2010-07-05 11:52:56 +02:00
parent 3a1d0b7a0f
commit 8f1f15e488

View file

@ -117,6 +117,7 @@ GST_START_TEST (test_parse_all_in_one_buf)
GstBuffer *buffer = NULL; GstBuffer *buffer = NULL;
gsize total_size = 0; gsize total_size = 0;
gsize offset = 0; gsize offset = 0;
GstCaps *caps;
/* Push the data in a single buffer, injecting some garbage. */ /* Push the data in a single buffer, injecting some garbage. */
total_size += sizeof (test_data_garbage); total_size += sizeof (test_data_garbage);
@ -149,8 +150,10 @@ GST_START_TEST (test_parse_all_in_one_buf)
sizeof (test_data_extra_ff)); sizeof (test_data_extra_ff));
offset += sizeof (test_data_extra_ff); offset += sizeof (test_data_extra_ff);
gst_buffer_set_caps (buffer, gst_caps_new_simple ("image/jpeg", "parsed", caps = gst_caps_new_simple ("image/jpeg", "parsed",
G_TYPE_BOOLEAN, FALSE, NULL)); G_TYPE_BOOLEAN, FALSE, NULL);
gst_buffer_set_caps (buffer, caps);
gst_caps_unref (caps);
GST_LOG ("Pushing single buffer of %u bytes.", (guint) total_size); GST_LOG ("Pushing single buffer of %u bytes.", (guint) total_size);
buffer_in = g_list_append (buffer_in, buffer); buffer_in = g_list_append (buffer_in, buffer);