fix gpujpeg_test

The test was still using module_done to destroy compress - this was
incorrect the commit 0557730 (2024-03-08) but didn't crash because struct
compress_state still has struct module as first member (the test is also
not run by CI).
This commit is contained in:
Martin Pulec
2025-06-18 09:42:02 +02:00
parent f66647cef6
commit ef0037313c

View File

@@ -36,7 +36,7 @@ static state_decompress *decompress{nullptr};
static void gpujpeg_test_teardown()
{
module_done(CAST_MODULE(compress));
compress_done(compress);
if (decompress != nullptr) {
decompress_done(decompress);
}
@@ -50,7 +50,7 @@ static void gpujpeg_test_setup()
int ret = compress_init(nullptr, "GPUJPEG:check", &compression);
if(ret >= 0) {
if(ret == 0) {
module_done(CAST_MODULE(compression));
compress_done(compression);
}
} else {
clog << "Either GPUJPEG not compiled in or no CUDA-capable devices found - skipping GPUJPEG tests.\n";