On Sun, Aug 27, 2023 at 8:06 PM Andrea paz <[email protected]> wrote:
>
> > you still have this
> > 0001-Fix-build-in-pluginfclient.C-with-ffmpeg-6.0.patch applied,
> > right?
>
> Ehm, No, I don't. Where do I find it again?

attached. May be we really should add it to our git even if 6.0 not
yet integrated (need to test on ffmpeg 5.1, specifically audio filters
from ffmpeg)

> Plus another question, in configure, don't I also need to use
> --without-thirdparty and disable some libraries? ( and maybe disable
> static-build as well)?

if building with ffmpeg.git ? No, unless some libs fails to build in
this configuration ....
From 43c1702579e1bf2c39be103b1d373b2dc1faee1d Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <[email protected]>
Date: Wed, 1 Mar 2023 22:25:17 +0300
Subject: [PATCH 1/4] Fix build in pluginfclient.C with ffmpeg 6.0

---
 cinelerra-5.1/cinelerra/pluginfclient.C | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/cinelerra-5.1/cinelerra/pluginfclient.C b/cinelerra-5.1/cinelerra/pluginfclient.C
index d188eb39..afb88c7a 100644
--- a/cinelerra-5.1/cinelerra/pluginfclient.C
+++ b/cinelerra-5.1/cinelerra/pluginfclient.C
@@ -37,6 +37,8 @@
 #include "vframe.h"
 #include "filexml.h"
 
+#include "libavfilter/version.h"
+
 #ifdef FFMPEG3
 #define av_filter_iterate(p) ((*(const AVFilter**)(p))=avfilter_next(*(const AVFilter **)(p)))
 #endif
@@ -660,13 +662,22 @@ PluginFClient::~PluginFClient()
 }
 
 bool PluginFClient::is_audio(const AVFilter *fp)
+
 {
 	if( !fp->outputs ) return 0;
+#if LIBAVFILTER_VERSION_MINOR > 2
+	if( avfilter_filter_pad_count(fp, 1) > 1 ) return 0;
+#else
 	if( avfilter_pad_count(fp->outputs) > 1 ) return 0;
+#endif
 	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( avfilter_filter_pad_count(fp, 0) > 1 ) return 0;
+#else
 	if( avfilter_pad_count(fp->inputs) > 1 ) return 0;
+#endif
 	if( !avfilter_pad_get_name(fp->inputs, 0) ) return 0;
 	if( avfilter_pad_get_type(fp->inputs, 0) != AVMEDIA_TYPE_AUDIO ) return 0;
 	return 1;
@@ -674,11 +685,19 @@ 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( avfilter_filter_pad_count(fp, 1) > 1 ) return 0;
+#else
 	if( avfilter_pad_count(fp->outputs) > 1 ) return 0;
+#endif
 	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( avfilter_filter_pad_count(fp, 0) > 1 ) return 0;
+#else
 	if( avfilter_pad_count(fp->inputs) > 1 ) return 0;
+#endif
 	if( !avfilter_pad_get_name(fp->inputs, 0) ) return 0;
 	if( avfilter_pad_get_type(fp->inputs, 0) != AVMEDIA_TYPE_VIDEO ) return 0;
 	return 1;
-- 
2.39.2

-- 
Cin mailing list
[email protected]
https://lists.cinelerra-gg.org/mailman/listinfo/cin

Reply via email to