forked from enlightenment/efl
evas - avif - fix for 0.8.2 libavif that broke api
also require 0.8.2 ... as well - no point trying to support older versions forever and this is still experimental. fixes T8844 @fix
This commit is contained in:
parent
5f3152a30b
commit
00f5eed1d2
|
@ -10,7 +10,7 @@ giflib = cc.find_library('gif')
|
|||
webp = dependency('libwebp', version: ['>=0.5.0'], required: get_option('evas-loaders-disabler').contains('webp') == false)
|
||||
webpdemux = dependency('libwebpdemux', version: ['>=0.5.0'], required: get_option('evas-loaders-disabler').contains('webp') == false)
|
||||
libopenjp2 = dependency('libopenjp2', required: get_option('evas-loaders-disabler').contains('jp2k') == false)
|
||||
libavif = dependency('libavif', required: get_option('evas-loaders-disabler').contains('avif') == false)
|
||||
libavif = dependency('libavif', required: get_option('evas-loaders-disabler').contains('avif') == false, version: '>= 0.8.2')
|
||||
|
||||
evas_image_loaders_file = [
|
||||
['avif', 'shared', [libavif]],
|
||||
|
|
|
@ -43,7 +43,6 @@ evas_image_load_file_head_avif_internal(Evas_Loader_Internal *loader,
|
|||
int *error)
|
||||
{
|
||||
Evas_Image_Animated *animated;
|
||||
avifROData raw;
|
||||
avifDecoder *decoder;
|
||||
avifResult res;
|
||||
Eina_Bool ret;
|
||||
|
@ -55,9 +54,6 @@ evas_image_load_file_head_avif_internal(Evas_Loader_Internal *loader,
|
|||
prop->h = 0;
|
||||
prop->alpha = EINA_FALSE;
|
||||
|
||||
raw.size = length;
|
||||
raw.data = (const uint8_t *)map;
|
||||
|
||||
decoder = avifDecoderCreate();
|
||||
if (!decoder)
|
||||
{
|
||||
|
@ -65,7 +61,8 @@ evas_image_load_file_head_avif_internal(Evas_Loader_Internal *loader,
|
|||
return ret;
|
||||
}
|
||||
|
||||
res = avifDecoderParse(decoder, &raw);
|
||||
avifDecoderSetIOMemory(decoder, (const uint8_t *)map, length);
|
||||
res = avifDecoderParse(decoder);
|
||||
if (res != AVIF_RESULT_OK)
|
||||
{
|
||||
ERR("avif file format invalid");
|
||||
|
@ -141,7 +138,6 @@ evas_image_load_file_data_avif_internal(Evas_Loader_Internal *loader,
|
|||
decoder = loader->decoder;
|
||||
if (!decoder)
|
||||
{
|
||||
avifROData raw;
|
||||
decoder = avifDecoderCreate();
|
||||
if (!decoder)
|
||||
{
|
||||
|
@ -149,10 +145,8 @@ evas_image_load_file_data_avif_internal(Evas_Loader_Internal *loader,
|
|||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
raw.size = length;
|
||||
raw.data = (const uint8_t *)map;
|
||||
|
||||
res = avifDecoderParse(decoder, &raw);
|
||||
avifDecoderSetIOMemory(decoder, (const uint8_t *)map, length);
|
||||
res = avifDecoderParse(decoder);
|
||||
if (res != AVIF_RESULT_OK)
|
||||
{
|
||||
*error = EVAS_LOAD_ERROR_GENERIC;
|
||||
|
|
Loading…
Reference in New Issue