ext/raw1394/gstdv1394src.c: gratuitous comment changes

Original commit message from CVS:
* ext/raw1394/gstdv1394src.c: (gst_dv1394src_discover_avc_node):
gratuitous comment changes
* tests/check/elements/level.c: (GST_START_TEST):
fix level test leaks
This commit is contained in:
Thomas Vander Stichele 2006-06-11 18:52:19 +00:00
parent a0e0e270bc
commit 95e65f4622
3 changed files with 32 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2006-06-11 Thomas Vander Stichele <thomas at apestaart dot org>
* ext/raw1394/gstdv1394src.c: (gst_dv1394src_discover_avc_node):
gratuitous comment changes
* tests/check/elements/level.c: (GST_START_TEST):
fix level test leaks
2006-06-11 Tim-Philipp Müller <tim at centricular dot net>
* gst/apetag/gsttagdemux.c: (gst_tag_demux_get_upstream_size):

View file

@ -706,7 +706,7 @@ gst_dv1394src_discover_avc_node (GstDV1394Src * src)
/* now loop over all the nodes */
for (i = 0; i < raw1394_get_nodecount (handle); i++) {
/* are we looking for an explicit GUID */
/* are we looking for an explicit GUID ? */
if (src->guid != 0) {
if (src->guid == rom1394_get_guid (handle, i)) {
node = i;
@ -718,7 +718,7 @@ gst_dv1394src_discover_avc_node (GstDV1394Src * src)
} else {
rom1394_directory rom_dir;
/* select first AV/C Tape Reccorder Player node */
/* select first AV/C Tape Recorder Player node */
if (rom1394_get_directory (handle, i, &rom_dir) < 0) {
GST_WARNING ("error reading config rom directory for node %d\n", i);
continue;

View file

@ -119,7 +119,9 @@ GST_START_TEST (test_int16)
/* create a bus to get the level message on */
bus = gst_bus_new ();
ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
gst_element_set_bus (level, bus);
ASSERT_OBJECT_REFCOUNT (bus, "bus", 2);
/* pushing gives away my reference ... */
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
@ -130,6 +132,7 @@ GST_START_TEST (test_int16)
fail_unless (inbuffer == outbuffer);
message = gst_bus_poll (bus, GST_MESSAGE_ELEMENT, -1);
ASSERT_OBJECT_REFCOUNT (message, "message", 1);
fail_unless (message != NULL);
fail_unless (GST_MESSAGE_SRC (message) == GST_OBJECT (level));
@ -151,10 +154,28 @@ GST_START_TEST (test_int16)
fail_if (dB > -5.9);
}
}
fail_unless_equals_int (g_list_length (buffers), 1);
fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
fail_unless (inbuffer == outbuffer);
/* clean up */
/* flush current messages,and future state change messages */
gst_bus_set_flushing (bus, TRUE);
/* message has a ref to the element */
ASSERT_OBJECT_REFCOUNT (level, "level", 2);
gst_message_unref (message);
// FIXME: need to fix leaks in level object first
//gst_object_unref (level);
ASSERT_OBJECT_REFCOUNT (level, "level", 1);
gst_element_set_bus (level, NULL);
ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
gst_object_unref (bus);
gst_buffer_unref (outbuffer);
fail_unless (gst_element_set_state (level,
GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
ASSERT_OBJECT_REFCOUNT (level, "level", 1);
gst_object_unref (level);
}
GST_END_TEST;