Credit Andrew - rest of fix for Arch (and termux) which includes thirdparty/Makefile
authorGood Guy <[email protected]>
Wed, 30 Aug 2023 02:20:10 +0000 (20:20 -0600)
committerGood Guy <[email protected]>
Wed, 30 Aug 2023 02:20:10 +0000 (20:20 -0600)
cinelerra-5.1/cinelerra/filepng.C
cinelerra-5.1/cinelerra/filetga.C
cinelerra-5.1/cinelerra/filetiff.C
cinelerra-5.1/thirdparty/Makefile

index 2386068be07d2a453d7561abff7f5b386d670e4e..e79c45d547bc307bdd42c391380610ba83696994 100644 (file)
@@ -259,6 +259,7 @@ int FilePNG::read_frame(VFrame *output, VFrame *input)
 
        //printf("FilePNG::read_frame 1 %d %d\n", native_cmodel, output->get_color_model());
        png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);
+       if(!png_ptr) return 0;
        info_ptr = png_create_info_struct(png_ptr);
        png_set_read_fn(png_ptr, input, (png_rw_ptr)read_function);
        png_read_info(png_ptr, info_ptr);
index df9a56ee94a36fbe95fa7adcabd7cdb839e54626..0bff2e187f6cd8c9c8d0de8b6c4aee37c69eba27 100644 (file)
@@ -337,6 +337,8 @@ void FileTGA::read_tga(Asset *asset, VFrame *frame, VFrame *data, VFrame* &temp)
                case 24:
                        source_cmodel = BC_RGB888;
                        break;
+               default:
+                       return;
        }
 
 // Read image
index 31a4bb7bb6ce88a39675d55a21ac006f57d7d919..fc24b384de73b7108c54d9c93b45cb2f57370761 100644 (file)
@@ -323,6 +323,9 @@ int FileTIFF::read_frame(VFrame *output, VFrame *input)
            tiff_mmap,
                tiff_unmap);
 
+       if(!stream)
+       return 0;
+
 // This loads the original TIFF data into each scanline of the output frame,
 // assuming the output scanlines are bigger than the input scanlines.
 // Then it expands the input data in reverse to fill the row.
index 8a5e5131f1405a54f096bb67ffe553f290ddb59a..32c9372f57b527493a4ff05357573a74f3739998 100644 (file)
@@ -253,6 +253,8 @@ openexr.cfg_vars?=true; \#
 openexr.mak_vars?=true; \#
 opus.cfg_params?= --disable-extra-programs
 speech_tools.mak_params?=-j1
+tiff.ldflags?="$(call ld_path,libjpeg,build)"
+tiff.cflags?="$(call lnc_path,libjpeg)"
 tiff.cfg_vars+=LIBS+=" -lpthread"; autoreconf -ifv -I m4 && automake -caf;
 tiff.cfg_params+= --disable-libdeflate --disable-lerc --enable-shared=no --disable-zstd $(call if_pkg,libwebp,\
  --with-webp-include-dir=$(call pkg_incl,libwebp)\