From: Good Guy Date: Wed, 30 Aug 2023 21:54:00 +0000 (-0600) Subject: Credit Andrew - cleanup for Slackware, etc. X-Git-Tag: 2023-08~1 X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=6f0ddd863f975ca407ddf08c59a9eb1db8d2fd72;p=goodguy%2Fcinelerra.git Credit Andrew - cleanup for Slackware, etc. --- diff --git a/cinelerra-5.1/cinelerra/fileexr.C b/cinelerra-5.1/cinelerra/fileexr.C index e786d4e9..a705f6c8 100644 --- a/cinelerra-5.1/cinelerra/fileexr.C +++ b/cinelerra-5.1/cinelerra/fileexr.C @@ -312,6 +312,9 @@ int FileEXR::read_frame_header(char *path) int FileEXR::read_frame(VFrame *frame, VFrame *data) { + + try { + Imf::setGlobalThreadCount(file->cpus); EXRIStream exr_stream((char*)data->get_data(), data->get_compressed_size()); Imf::InputFile file(exr_stream); @@ -426,6 +429,10 @@ int FileEXR::read_frame(VFrame *frame, VFrame *data) } } return 0; + } catch (const std::exception &e) { + std::cerr << "error reading EXR image file:" << e.what() << std::endl; + return 1; + } } diff --git a/cinelerra-5.1/cinelerra/filepng.C b/cinelerra-5.1/cinelerra/filepng.C index e79c45d5..f4b09d7d 100644 --- a/cinelerra-5.1/cinelerra/filepng.C +++ b/cinelerra-5.1/cinelerra/filepng.C @@ -261,6 +261,11 @@ int FilePNG::read_frame(VFrame *output, VFrame *input) 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); + if(!info_ptr) return 0; + if (setjmp(png_jmpbuf(png_ptr))) { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return 0; + } png_set_read_fn(png_ptr, input, (png_rw_ptr)read_function); png_read_info(png_ptr, info_ptr); diff --git a/cinelerra-5.1/cinelerra/pluginfclient.C b/cinelerra-5.1/cinelerra/pluginfclient.C index afb88c7a..b335628a 100644 --- a/cinelerra-5.1/cinelerra/pluginfclient.C +++ b/cinelerra-5.1/cinelerra/pluginfclient.C @@ -665,7 +665,7 @@ bool PluginFClient::is_audio(const AVFilter *fp) { if( !fp->outputs ) return 0; -#if LIBAVFILTER_VERSION_MINOR > 2 +#if LIBAVFILTER_VERSION_MINOR > 2 && LIBAVFILTER_VERSION_MAJOR > 7 if( avfilter_filter_pad_count(fp, 1) > 1 ) return 0; #else if( avfilter_pad_count(fp->outputs) > 1 ) return 0; @@ -673,7 +673,7 @@ bool PluginFClient::is_audio(const AVFilter *fp) if( !avfilter_pad_get_name(fp->outputs, 0) ) return 0; if( avfilter_pad_get_type(fp->outputs, 0) != AVMEDIA_TYPE_AUDIO ) return 0; if( !fp->inputs ) return 1; -#if LIBAVFILTER_VERSION_MINOR > 2 +#if LIBAVFILTER_VERSION_MINOR > 2 && LIBAVFILTER_VERSION_MAJOR > 7 if( avfilter_filter_pad_count(fp, 0) > 1 ) return 0; #else if( avfilter_pad_count(fp->inputs) > 1 ) return 0; @@ -685,7 +685,7 @@ bool PluginFClient::is_audio(const AVFilter *fp) bool PluginFClient::is_video(const AVFilter *fp) { if( !fp->outputs ) return 0; -#if LIBAVFILTER_VERSION_MINOR > 2 +#if LIBAVFILTER_VERSION_MINOR > 2 && LIBAVFILTER_VERSION_MAJOR > 7 if( avfilter_filter_pad_count(fp, 1) > 1 ) return 0; #else if( avfilter_pad_count(fp->outputs) > 1 ) return 0; @@ -693,7 +693,7 @@ bool PluginFClient::is_video(const AVFilter *fp) if( !avfilter_pad_get_name(fp->outputs, 0) ) return 0; if( avfilter_pad_get_type(fp->outputs, 0) != AVMEDIA_TYPE_VIDEO ) return 0; if( !fp->inputs ) return 1; -#if LIBAVFILTER_VERSION_MINOR > 2 +#if LIBAVFILTER_VERSION_MINOR > 2 && LIBAVFILTER_VERSION_MAJOR > 7 if( avfilter_filter_pad_count(fp, 0) > 1 ) return 0; #else if( avfilter_pad_count(fp->inputs) > 1 ) return 0; diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile index 32c9372f..7aa050c9 100644 --- a/cinelerra-5.1/thirdparty/Makefile +++ b/cinelerra-5.1/thirdparty/Makefile @@ -367,7 +367,7 @@ $(call rules,$(call std-build,openExr, ilmBase)) $(call rules,$(call std-build,openjpeg)) $(call rules,$(call std-build,opus)) $(call rules,$(call std-build,speech_tools)) -$(call rules,$(call std-build,tiff, libwebp)) +$(call rules,$(call std-build,tiff, libwebp libjpeg)) $(call rules,$(call std-build,twolame)) $(call rules,$(call std-build,x264)) $(call rules,$(call std-build,x265))