diff options
author | Jiyong Min <jiyong.min@samsung.com> | 2021-11-19 12:07:49 +0900 |
---|---|---|
committer | Jiyong Min <jiyong.min@samsung.com> | 2021-11-19 04:50:20 +0000 |
commit | bdccaca89419c977f179835a77227bc6b968a5af (patch) | |
tree | 81215a1007d066ed4f17ddd2753ce62707d3635a | |
parent | 1e9e50cf6e1c4da42d7d46c05dd8856d7b291b9d (diff) | |
download | libheif-tizen_6.5.tar.gz libheif-tizen_6.5.tar.bz2 libheif-tizen_6.5.zip |
remove duplicate codes and unused headerstizen_6.5
Change-Id: I27efd59dacb934ebe3d812e663467cc25bdd8fd5
-rw-r--r-- | packaging/libheif.spec | 1 | ||||
-rw-r--r-- | test/heif_testsuite.c | 16 |
2 files changed, 5 insertions, 12 deletions
diff --git a/packaging/libheif.spec b/packaging/libheif.spec index ec41e2b..2c22b55 100644 --- a/packaging/libheif.spec +++ b/packaging/libheif.spec @@ -65,4 +65,3 @@ rm -rf %{buildroot} %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/* - diff --git a/test/heif_testsuite.c b/test/heif_testsuite.c index 120471f..8429ed6 100644 --- a/test/heif_testsuite.c +++ b/test/heif_testsuite.c @@ -25,9 +25,6 @@ #include <magick/api.h> #include <heif.h> -#include <heif_source.h> -#include <heif_extractor.h> -#include <heif_decoder.h> typedef enum { TEST_AUTO, @@ -313,9 +310,9 @@ static bool __test_get_info(int mode) } ret = heif_get_image_info_from_buffer((unsigned char *)((void *)buffer), (size_t)size, &image_info); + g_free(buffer); if (ret != LIBHEIF_ERROR_NONE) { g_print("\t[HEIF_TEST] heif_get_image_info_from_buffer fail %d\n", ret); - g_free(buffer); return false; } @@ -327,7 +324,6 @@ static bool __test_get_info(int mode) result = false; } - g_free(buffer); break; default: @@ -376,9 +372,9 @@ static bool __test_decode(int mode) } ret = heif_decode_image_from_buffer((unsigned char *)((void *)buffer), (size_t)size, g_color, &image); + g_free(buffer); if (ret != LIBHEIF_ERROR_NONE) { g_print("\t[HEIF_TEST] heif_decode_image_from_buffer fail %d\n", ret); - g_free(buffer); return false; } @@ -392,7 +388,6 @@ static bool __test_decode(int mode) if (ret != LIBHEIF_ERROR_NONE) g_print("\t[HEIF_TEST] __save_to_image fail %d\n", ret); - g_free(buffer); break; default: @@ -400,7 +395,7 @@ static bool __test_decode(int mode) return false; } - heif_decoder_destroy_image(image); + heif_image_free(image); return true; } @@ -441,9 +436,9 @@ static bool __test_thumb(int mode) } ret = heif_decode_thumb_from_buffer((unsigned char *)((void *)buffer), (size_t)size, g_color, &thumbnail); + g_free(buffer); if (ret != LIBHEIF_ERROR_NONE) { g_print("\t[HEIF_TEST] heif_decode_thumb_from_buffer fail %d\n", ret); - g_free(buffer); return false; } @@ -457,7 +452,6 @@ static bool __test_thumb(int mode) if (ret != LIBHEIF_ERROR_NONE) g_print("\t[HEIF_TEST] __save_to_image fail %d\n", ret); - g_free(buffer); break; default: @@ -465,7 +459,7 @@ static bool __test_thumb(int mode) return false; } - heif_decoder_destroy_image(thumbnail); + heif_image_free(thumbnail); return true; } |