mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
tests: videodecoder: plug a few leaks
Remove leaks of caps and events references
This commit is contained in:
parent
47f720a8f0
commit
1d75bdca92
1 changed files with 4 additions and 3 deletions
|
@ -209,6 +209,9 @@ cleanup_videodecodertest (void)
|
|||
gst_check_teardown_src_pad (dec);
|
||||
gst_check_teardown_sink_pad (dec);
|
||||
gst_check_teardown_element (dec);
|
||||
|
||||
g_list_free_full (events, (GDestroyNotify) gst_event_unref);
|
||||
events = NULL;
|
||||
}
|
||||
|
||||
static GstBuffer *
|
||||
|
@ -245,7 +248,7 @@ send_startup_events (void)
|
|||
TEST_VIDEO_WIDTH, "height", G_TYPE_INT, TEST_VIDEO_HEIGHT, "framerate",
|
||||
GST_TYPE_FRACTION, TEST_VIDEO_FPS_N, TEST_VIDEO_FPS_D, NULL);
|
||||
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_caps (caps)));
|
||||
|
||||
gst_caps_unref (caps);
|
||||
}
|
||||
|
||||
#define NUM_BUFFERS 1000
|
||||
|
@ -412,9 +415,7 @@ GST_START_TEST (videodecoder_playback_with_events)
|
|||
fail_unless (events_iter == NULL);
|
||||
|
||||
g_list_free_full (buffers, (GDestroyNotify) gst_buffer_unref);
|
||||
g_list_free_full (events, (GDestroyNotify) gst_event_unref);
|
||||
buffers = NULL;
|
||||
events = NULL;
|
||||
|
||||
cleanup_videodecodertest ();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue