From c15a898742893a58f730a469d70e7a19e3b60ee5 Mon Sep 17 00:00:00 2001 From: Doug Nazar Date: Fri, 23 May 2025 07:12:40 -0400 Subject: [PATCH] vkvideoencodeh26x: ensure we call teardown() for each test Part-of: --- .../gst-plugins-bad/tests/check/libs/vkvideoencodeh264.c | 8 +++++--- .../gst-plugins-bad/tests/check/libs/vkvideoencodeh265.c | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/subprojects/gst-plugins-bad/tests/check/libs/vkvideoencodeh264.c b/subprojects/gst-plugins-bad/tests/check/libs/vkvideoencodeh264.c index b78bd26243..1dc8a07572 100644 --- a/subprojects/gst-plugins-bad/tests/check/libs/vkvideoencodeh264.c +++ b/subprojects/gst-plugins-bad/tests/check/libs/vkvideoencodeh264.c @@ -794,7 +794,7 @@ GST_START_TEST (test_encoder_h264_i) enc = setup_h264_encoder (width, height, sps_id, pps_id); if (!enc) { GST_WARNING ("Unable to initialize H264 encoder"); - return; + goto beach; } buffer_pool = allocate_buffer_pool (enc, width, height); @@ -816,6 +816,7 @@ GST_START_TEST (test_encoder_h264_i) fail_unless (gst_buffer_pool_set_active (img_pool, FALSE)); gst_object_unref (img_pool); +beach: tear_down_encoder (enc); } @@ -837,7 +838,7 @@ GST_START_TEST (test_encoder_h264_i_p) enc = setup_h264_encoder (width, height, sps_id, pps_id); if (!enc) { GST_WARNING ("Unable to initialize H264 encoder"); - return; + goto beach; } buffer_pool = allocate_buffer_pool (enc, width, height); @@ -872,6 +873,7 @@ GST_START_TEST (test_encoder_h264_i_p) fail_unless (gst_buffer_pool_set_active (img_pool, FALSE)); gst_object_unref (img_pool); +beach: tear_down_encoder (enc); } @@ -895,7 +897,7 @@ GST_START_TEST (test_encoder_h264_i_p_b) enc = setup_h264_encoder (width, height, sps_id, pps_id); if (!enc) { GST_WARNING ("Unable to initialize H264 encoder"); - return; + goto beach; } fail_unless (gst_vulkan_encoder_caps (enc, &enc_caps)); diff --git a/subprojects/gst-plugins-bad/tests/check/libs/vkvideoencodeh265.c b/subprojects/gst-plugins-bad/tests/check/libs/vkvideoencodeh265.c index 3c05d61a92..6d0cbab096 100644 --- a/subprojects/gst-plugins-bad/tests/check/libs/vkvideoencodeh265.c +++ b/subprojects/gst-plugins-bad/tests/check/libs/vkvideoencodeh265.c @@ -965,7 +965,7 @@ GST_START_TEST (test_encoder_h265_i) enc = setup_h265_encoder (width, height, vps_id, sps_id, pps_id); if (!enc) { GST_WARNING ("Unable to initialize H265 encoder"); - return; + goto beach; } buffer_pool = allocate_buffer_pool (enc, width, height); @@ -987,6 +987,7 @@ GST_START_TEST (test_encoder_h265_i) fail_unless (gst_buffer_pool_set_active (img_pool, FALSE)); gst_object_unref (img_pool); +beach: tear_down_encoder (enc); } @@ -1009,7 +1010,7 @@ GST_START_TEST (test_encoder_h265_i_p) enc = setup_h265_encoder (width, height, vps_id, sps_id, pps_id); if (!enc) { GST_WARNING ("Unable to initialize H265 encoder"); - return; + goto beach; } buffer_pool = allocate_buffer_pool (enc, width, height); @@ -1041,6 +1042,7 @@ GST_START_TEST (test_encoder_h265_i_p) fail_unless (gst_buffer_pool_set_active (img_pool, FALSE)); gst_object_unref (img_pool); +beach: tear_down_encoder (enc); } @@ -1065,7 +1067,7 @@ GST_START_TEST (test_encoder_h265_i_p_b) enc = setup_h265_encoder (width, height, vps_id, sps_id, pps_id); if (!enc) { GST_WARNING ("Unable to initialize H265 encoder"); - return; + goto beach; } fail_unless (gst_vulkan_encoder_caps (enc, &enc_caps));