From a1fe8252170b6b5866024299f7334756a3e78fe2 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Wed, 30 Aug 2023 02:48:47 +0300
Subject: [PATCH] Possible fix for ffmpeg 4.4 in pluginfclient.C

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

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;
-- 
2.35.7

