From e64ca4a0dc53fb6496fbb4c7842d60303bd1d012 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 2 May 2025 16:04:46 -0700 Subject: [PATCH] ffmpeg: add libatomic dependency Some platforms lack builtin atomics and use libatomic. Add it. Backport various patches to fix some warnings. Signed-off-by: Rosen Penev --- multimedia/ffmpeg/Makefile | 4 +- ...codec-fix-Wint-conversion-in-vulkan.patch} | 0 ...ard-fd_dup-by-FD_PROTOCOL-or-PIPE_PR.patch | 31 ++++++++++ ...fix-the-print-format-of-VkDeviceSize.patch | 24 ++++++++ ...e-declarations-and-definitions-match.patch | 58 +++++++++++++++++++ multimedia/ffmpeg/patches/050-glibc.patch | 11 ---- ...060-avutil-tx-fix-GCC-memset-warning.patch | 23 ++++++++ ...-rawdec-guard-by-CONFIG_DATA_DEMUXER.patch | 30 ++++++++++ ...ay-dvd-Use-correct-pointer-types-on-.patch | 43 ++++++++++++++ ...ff-Suppress-unused-variable-warnings.patch | 30 ++++++++++ ...tore-autodetection-of-v4l2-and-fbdev.patch | 29 ++++++++++ ...figure-improve-check-for-POSIX-ioctl.patch | 41 +++++++++++++ ...nelsplit-fix-mixed-declaration-and-c.patch | 30 ++++++++++ 13 files changed, 341 insertions(+), 13 deletions(-) rename multimedia/ffmpeg/patches/{020-gcc14.patch => 020-libavcodec-fix-Wint-conversion-in-vulkan.patch} (100%) create mode 100644 multimedia/ffmpeg/patches/030-avformat-file-guard-fd_dup-by-FD_PROTOCOL-or-PIPE_PR.patch create mode 100644 multimedia/ffmpeg/patches/040-vulkan_decode-fix-the-print-format-of-VkDeviceSize.patch create mode 100644 multimedia/ffmpeg/patches/050-avcodec-dct-Make-declarations-and-definitions-match.patch delete mode 100644 multimedia/ffmpeg/patches/050-glibc.patch create mode 100644 multimedia/ffmpeg/patches/060-avutil-tx-fix-GCC-memset-warning.patch create mode 100644 multimedia/ffmpeg/patches/070-avformat-rawdec-guard-by-CONFIG_DATA_DEMUXER.patch create mode 100644 multimedia/ffmpeg/patches/080-avcodec-pcm-bluray-dvd-Use-correct-pointer-types-on-.patch create mode 100644 multimedia/ffmpeg/patches/090-avcodec-tiff-Suppress-unused-variable-warnings.patch create mode 100644 multimedia/ffmpeg/patches/100-configure-restore-autodetection-of-v4l2-and-fbdev.patch create mode 100644 multimedia/ffmpeg/patches/110-configure-improve-check-for-POSIX-ioctl.patch create mode 100644 multimedia/ffmpeg/patches/120-avfilter-af_channelsplit-fix-mixed-declaration-and-c.patch diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile index cd3928015..411975f8a 100644 --- a/multimedia/ffmpeg/Makefile +++ b/multimedia/ffmpeg/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ffmpeg PKG_VERSION:=6.1.2 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://ffmpeg.org/releases/ @@ -231,7 +231,7 @@ include $(INCLUDE_DIR)/package.mk define Package/ffmpeg/Default TITLE:=FFmpeg URL:=https://ffmpeg.org/ - DEPENDS+= +libpthread + DEPENDS+= +libatomic endef define Package/ffmpeg/Default/description diff --git a/multimedia/ffmpeg/patches/020-gcc14.patch b/multimedia/ffmpeg/patches/020-libavcodec-fix-Wint-conversion-in-vulkan.patch similarity index 100% rename from multimedia/ffmpeg/patches/020-gcc14.patch rename to multimedia/ffmpeg/patches/020-libavcodec-fix-Wint-conversion-in-vulkan.patch diff --git a/multimedia/ffmpeg/patches/030-avformat-file-guard-fd_dup-by-FD_PROTOCOL-or-PIPE_PR.patch b/multimedia/ffmpeg/patches/030-avformat-file-guard-fd_dup-by-FD_PROTOCOL-or-PIPE_PR.patch new file mode 100644 index 000000000..00487f5c2 --- /dev/null +++ b/multimedia/ffmpeg/patches/030-avformat-file-guard-fd_dup-by-FD_PROTOCOL-or-PIPE_PR.patch @@ -0,0 +1,31 @@ +From cb9c98da16e8412046835ebc0d167a4e09909df0 Mon Sep 17 00:00:00 2001 +From: Zhao Zhili +Date: Sun, 30 Jun 2024 18:33:19 +0800 +Subject: [PATCH] avformat/file: guard fd_dup by FD_PROTOCOL or PIPE_PROTOCOL + +fd_dup is unused when fd and pipe have been disabled. This also +fix build error with wasi since 'dup' isn't available. + +Signed-off-by: Zhao Zhili +--- + libavformat/file.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/libavformat/file.c ++++ b/libavformat/file.c +@@ -192,6 +192,7 @@ static int file_check(URLContext *h, int + return ret; + } + ++#if CONFIG_FD_PROTOCOL || CONFIG_PIPE_PROTOCOL + static int fd_dup(URLContext *h, int oldfd) + { + int newfd; +@@ -214,6 +215,7 @@ static int fd_dup(URLContext *h, int old + #endif + return newfd; + } ++#endif + + static int file_close(URLContext *h) + { diff --git a/multimedia/ffmpeg/patches/040-vulkan_decode-fix-the-print-format-of-VkDeviceSize.patch b/multimedia/ffmpeg/patches/040-vulkan_decode-fix-the-print-format-of-VkDeviceSize.patch new file mode 100644 index 000000000..aa7c99172 --- /dev/null +++ b/multimedia/ffmpeg/patches/040-vulkan_decode-fix-the-print-format-of-VkDeviceSize.patch @@ -0,0 +1,24 @@ +From c961ac4b0ca27d451c430553793b3fff88fc78e5 Mon Sep 17 00:00:00 2001 +From: Jun Zhao +Date: Sun, 12 Nov 2023 18:25:29 +0800 +Subject: [PATCH] vulkan_decode: fix the print format of VkDeviceSize + +VkDeviceSize represents device memory size and offset +values as uint64_t in Spec. + +Signed-off-by: Jun Zhao +--- + libavcodec/vulkan_video.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/libavcodec/vulkan_video.c ++++ b/libavcodec/vulkan_video.c +@@ -384,7 +384,7 @@ av_cold int ff_vk_video_common_init(void + .memorySize = mem[i].memoryRequirements.size, + }; + +- av_log(log, AV_LOG_VERBOSE, "Allocating %"SIZE_SPECIFIER" bytes in bind index %i for video session\n", ++ av_log(log, AV_LOG_VERBOSE, "Allocating %"PRIu64" bytes in bind index %i for video session\n", + bind_mem[i].memorySize, bind_mem[i].memoryBindIndex); + } + diff --git a/multimedia/ffmpeg/patches/050-avcodec-dct-Make-declarations-and-definitions-match.patch b/multimedia/ffmpeg/patches/050-avcodec-dct-Make-declarations-and-definitions-match.patch new file mode 100644 index 000000000..8b0506794 --- /dev/null +++ b/multimedia/ffmpeg/patches/050-avcodec-dct-Make-declarations-and-definitions-match.patch @@ -0,0 +1,58 @@ +From 2204efc2a656ae60d77a4d01c6cf8e7d6baaf030 Mon Sep 17 00:00:00 2001 +From: Andreas Rheinhardt +Date: Sun, 30 Mar 2025 12:49:07 +0200 +Subject: [PATCH] avcodec/dct: Make declarations and definitions match + +GCC considers declarations using a parameter of pointer +type (or equivalently a parameter using an array of unspecified +dimensions) to be inconsistent with a declaration using +a known-length array type and emits a -Warray-parameter warning +for several ff_j_rev_dct* functions for this. + +This patch makes the declarations match the actual definitions +to suppress these (IMO nonsensical) warnings. + +Signed-off-by: Andreas Rheinhardt +--- + libavcodec/dct.h | 12 ++++++------ + libavcodec/jrevdct.c | 4 ++-- + 2 files changed, 8 insertions(+), 8 deletions(-) + +--- a/libavcodec/dct.h ++++ b/libavcodec/dct.h +@@ -27,11 +27,11 @@ + #include + #include + +-void ff_j_rev_dct(int16_t *data); +-void ff_j_rev_dct4(int16_t *data); +-void ff_j_rev_dct2(int16_t *data); +-void ff_j_rev_dct1(int16_t *data); +-void ff_jref_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +-void ff_jref_idct_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block); ++void ff_j_rev_dct(int16_t data[64]); ++void ff_j_rev_dct4(int16_t data[64]); ++void ff_j_rev_dct2(int16_t data[64]); ++void ff_j_rev_dct1(int16_t data[64]); ++void ff_jref_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t block[64]); ++void ff_jref_idct_add(uint8_t *dest, ptrdiff_t line_size, int16_t block[64]); + + #endif /* AVCODEC_DCT_H */ +--- a/libavcodec/jrevdct.c ++++ b/libavcodec/jrevdct.c +@@ -1159,13 +1159,13 @@ void ff_j_rev_dct1(DCTBLOCK data){ + #undef FIX + #undef CONST_BITS + +-void ff_jref_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block) ++void ff_jref_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t block[64]) + { + ff_j_rev_dct(block); + ff_put_pixels_clamped_c(block, dest, line_size); + } + +-void ff_jref_idct_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block) ++void ff_jref_idct_add(uint8_t *dest, ptrdiff_t line_size, int16_t block[64]) + { + ff_j_rev_dct(block); + ff_add_pixels_clamped_c(block, dest, line_size); diff --git a/multimedia/ffmpeg/patches/050-glibc.patch b/multimedia/ffmpeg/patches/050-glibc.patch deleted file mode 100644 index 25eba2aea..000000000 --- a/multimedia/ffmpeg/patches/050-glibc.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libavcodec/wmv2dsp.c -+++ b/libavcodec/wmv2dsp.c -@@ -264,7 +264,7 @@ av_cold void ff_wmv2dsp_init(WMV2DSPCont - c->put_mspel_pixels_tab[6] = put_mspel8_mc22_c; - c->put_mspel_pixels_tab[7] = put_mspel8_mc32_c; - --#if ARCH_MIPS -+#if ARCH_MIPS64 - ff_wmv2dsp_init_mips(c); - #endif - } diff --git a/multimedia/ffmpeg/patches/060-avutil-tx-fix-GCC-memset-warning.patch b/multimedia/ffmpeg/patches/060-avutil-tx-fix-GCC-memset-warning.patch new file mode 100644 index 000000000..1206138ee --- /dev/null +++ b/multimedia/ffmpeg/patches/060-avutil-tx-fix-GCC-memset-warning.patch @@ -0,0 +1,23 @@ +From 9a670636c0ee7c24b70591d315524e61c709ea5a Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Fri, 2 May 2025 15:15:25 -0700 +Subject: [PATCH] avutil/tx: fix GCC memset warning + +The warning is that the whole array is not being cleared. + +Signed-off-by: Rosen Penev +--- + libavutil/tx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/libavutil/tx.c ++++ b/libavutil/tx.c +@@ -283,7 +283,7 @@ static void reset_ctx(AVTXContext *s, in + * ff_tx_init_subtx() call is made. */ + s->nb_sub = 0; + s->opaque = NULL; +- memset(s->fn, 0, sizeof(*s->fn)); ++ memset(s->fn, 0, sizeof(s->fn)); + } + + void ff_tx_clear_ctx(AVTXContext *s) diff --git a/multimedia/ffmpeg/patches/070-avformat-rawdec-guard-by-CONFIG_DATA_DEMUXER.patch b/multimedia/ffmpeg/patches/070-avformat-rawdec-guard-by-CONFIG_DATA_DEMUXER.patch new file mode 100644 index 000000000..c8fb97b86 --- /dev/null +++ b/multimedia/ffmpeg/patches/070-avformat-rawdec-guard-by-CONFIG_DATA_DEMUXER.patch @@ -0,0 +1,30 @@ +From 22baff53be0f830a1607af2b60e50605eb732ec4 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Fri, 2 May 2025 15:21:13 -0700 +Subject: [PATCH] avformat/rawdec: guard by CONFIG_DATA_DEMUXER + +Otherwise raw_data_read_header becomes an unused static function. + +Signed-off-by: Rosen Penev +--- + libavformat/rawdec.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/libavformat/rawdec.c ++++ b/libavformat/rawdec.c +@@ -102,6 +102,7 @@ int ff_raw_subtitle_read_header(AVFormat + return 0; + } + ++#if CONFIG_DATA_DEMUXER + static int raw_data_read_header(AVFormatContext *s) + { + AVStream *st = avformat_new_stream(s, NULL); +@@ -112,6 +113,7 @@ static int raw_data_read_header(AVFormat + st->start_time = 0; + return 0; + } ++#endif + + /* Note: Do not forget to add new entries to the Makefile as well. */ + diff --git a/multimedia/ffmpeg/patches/080-avcodec-pcm-bluray-dvd-Use-correct-pointer-types-on-.patch b/multimedia/ffmpeg/patches/080-avcodec-pcm-bluray-dvd-Use-correct-pointer-types-on-.patch new file mode 100644 index 000000000..29abd8881 --- /dev/null +++ b/multimedia/ffmpeg/patches/080-avcodec-pcm-bluray-dvd-Use-correct-pointer-types-on-.patch @@ -0,0 +1,43 @@ +From 347a70f101be28f8d78e8fd62ffc3a78324f49e9 Mon Sep 17 00:00:00 2001 +From: Andreas Rheinhardt +Date: Thu, 28 Mar 2024 05:35:36 +0100 +Subject: [PATCH] avcodec/pcm-bluray/dvd: Use correct pointer types on BE + +Signed-off-by: Andreas Rheinhardt +--- + libavcodec/pcm-bluray.c | 5 +++-- + libavcodec/pcm-dvd.c | 2 +- + 2 files changed, 4 insertions(+), 3 deletions(-) + +--- a/libavcodec/pcm-bluray.c ++++ b/libavcodec/pcm-bluray.c +@@ -167,7 +167,7 @@ static int pcm_bluray_decode_frame(AVCod + samples *= num_source_channels; + if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) { + #if HAVE_BIGENDIAN +- bytestream2_get_buffer(&gb, dst16, buf_size); ++ bytestream2_get_buffer(&gb, (uint8_t*)dst16, buf_size); + #else + do { + *dst16++ = bytestream2_get_be16u(&gb); +@@ -187,7 +187,8 @@ static int pcm_bluray_decode_frame(AVCod + if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) { + do { + #if HAVE_BIGENDIAN +- bytestream2_get_buffer(&gb, dst16, avctx->ch_layout.nb_channels * 2); ++ bytestream2_get_buffer(&gb, (uint8_t*)dst16, ++ avctx->ch_layout.nb_channels * 2); + dst16 += avctx->ch_layout.nb_channels; + #else + channel = avctx->ch_layout.nb_channels; +--- a/libavcodec/pcm-dvd.c ++++ b/libavcodec/pcm-dvd.c +@@ -157,7 +157,7 @@ static void *pcm_dvd_decode_samples(AVCo + switch (avctx->bits_per_coded_sample) { + case 16: { + #if HAVE_BIGENDIAN +- bytestream2_get_buffer(&gb, dst16, blocks * s->block_size); ++ bytestream2_get_buffer(&gb, (uint8_t*)dst16, blocks * s->block_size); + dst16 += blocks * s->block_size / 2; + #else + int samples = blocks * avctx->ch_layout.nb_channels; diff --git a/multimedia/ffmpeg/patches/090-avcodec-tiff-Suppress-unused-variable-warnings.patch b/multimedia/ffmpeg/patches/090-avcodec-tiff-Suppress-unused-variable-warnings.patch new file mode 100644 index 000000000..65bed6508 --- /dev/null +++ b/multimedia/ffmpeg/patches/090-avcodec-tiff-Suppress-unused-variable-warnings.patch @@ -0,0 +1,30 @@ +From bb3c50b46d50b8bf4f45d7ae8f24607aaf23acea Mon Sep 17 00:00:00 2001 +From: Andreas Rheinhardt +Date: Sun, 2 Jun 2024 06:11:46 +0200 +Subject: [PATCH] avcodec/tiff: Suppress unused variable warnings + +Signed-off-by: Andreas Rheinhardt +--- + libavcodec/tiff.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/libavcodec/tiff.c ++++ b/libavcodec/tiff.c +@@ -427,7 +427,7 @@ static void av_always_inline horizontal_ + uint8_t shift = is_dng ? 0 : 16 - bpp; + GetBitContext gb; + +- int ret = init_get_bits8(&gb, src, width); ++ av_unused int ret = init_get_bits8(&gb, src, width); + av_assert1(ret >= 0); + for (int i = 0; i < s->width; i++) { + dst16[i] = get_bits(&gb, bpp) << shift; +@@ -462,7 +462,7 @@ static void unpack_gray(TiffContext *s, + GetBitContext gb; + uint16_t *dst = (uint16_t *)(p->data[0] + lnum * p->linesize[0]); + +- int ret = init_get_bits8(&gb, src, width); ++ av_unused int ret = init_get_bits8(&gb, src, width); + av_assert1(ret >= 0); + + for (int i = 0; i < s->width; i++) { diff --git a/multimedia/ffmpeg/patches/100-configure-restore-autodetection-of-v4l2-and-fbdev.patch b/multimedia/ffmpeg/patches/100-configure-restore-autodetection-of-v4l2-and-fbdev.patch new file mode 100644 index 000000000..337d28fc7 --- /dev/null +++ b/multimedia/ffmpeg/patches/100-configure-restore-autodetection-of-v4l2-and-fbdev.patch @@ -0,0 +1,29 @@ +From 7405f1ad5351cc24b91a0227aeeaf24ff9d12278 Mon Sep 17 00:00:00 2001 +From: Ramiro Polla +Date: Wed, 3 Jul 2024 00:30:08 +0200 +Subject: [PATCH] configure: restore autodetection of v4l2 and fbdev + +The detection logic for v4l2 and fbdev was accidentally modified to +depend on v4l2-m2m in 43b3412. +--- + configure | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +--- a/configure ++++ b/configure +@@ -6985,11 +6985,12 @@ pod2man --help > /dev/null 2>&1 && e + rsync --help 2> /dev/null | grep -q 'contimeout' && enable rsync_contimeout || disable rsync_contimeout + xmllint --version > /dev/null 2>&1 && enable xmllint || disable xmllint + ++check_headers linux/fb.h ++check_headers linux/videodev2.h ++test_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete ++ + # check V4L2 codecs available in the API + if enabled v4l2_m2m; then +- check_headers linux/fb.h +- check_headers linux/videodev2.h +- test_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete + check_cc v4l2_m2m linux/videodev2.h "int i = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_VIDEO_M2M | V4L2_BUF_FLAG_LAST;" + check_cc vc1_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_VC1_ANNEX_G;" + check_cc mpeg1_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_MPEG1;" diff --git a/multimedia/ffmpeg/patches/110-configure-improve-check-for-POSIX-ioctl.patch b/multimedia/ffmpeg/patches/110-configure-improve-check-for-POSIX-ioctl.patch new file mode 100644 index 000000000..5b7bd03a6 --- /dev/null +++ b/multimedia/ffmpeg/patches/110-configure-improve-check-for-POSIX-ioctl.patch @@ -0,0 +1,41 @@ +From 00b64fca55a3a009c9d0e391c85f4fd3291e5d12 Mon Sep 17 00:00:00 2001 +From: Ramiro Polla +Date: Thu, 29 Aug 2024 15:40:00 +0200 +Subject: [PATCH] configure: improve check for POSIX ioctl + +Instead of relying on system #ifdefs which may or may not be correct, +detect the POSIX ioctl signature at configure time. +--- + configure | 2 ++ + libavdevice/v4l2.c | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +--- a/configure ++++ b/configure +@@ -2450,6 +2450,7 @@ HAVE_LIST=" + opencl_vaapi_intel_media + perl + pod2man ++ posix_ioctl + texi2html + xmllint + zlib_gzip +@@ -6988,6 +6989,7 @@ xmllint --version > /dev/null 2>&1 && e + check_headers linux/fb.h + check_headers linux/videodev2.h + test_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete ++test_code cc sys/ioctl.h "int ioctl(int, int, ...)" && enable posix_ioctl + + # check V4L2 codecs available in the API + if enabled v4l2_m2m; then +--- a/libavdevice/v4l2.c ++++ b/libavdevice/v4l2.c +@@ -107,7 +107,7 @@ struct video_data { + int (*open_f)(const char *file, int oflag, ...); + int (*close_f)(int fd); + int (*dup_f)(int fd); +-#if defined(__sun) || defined(__BIONIC__) || defined(__musl__) /* POSIX-like */ ++#if HAVE_POSIX_IOCTL + int (*ioctl_f)(int fd, int request, ...); + #else + int (*ioctl_f)(int fd, unsigned long int request, ...); diff --git a/multimedia/ffmpeg/patches/120-avfilter-af_channelsplit-fix-mixed-declaration-and-c.patch b/multimedia/ffmpeg/patches/120-avfilter-af_channelsplit-fix-mixed-declaration-and-c.patch new file mode 100644 index 000000000..9b37926e5 --- /dev/null +++ b/multimedia/ffmpeg/patches/120-avfilter-af_channelsplit-fix-mixed-declaration-and-c.patch @@ -0,0 +1,30 @@ +From 613c85a8f5b296c2b79fc0abfd98fccf962bb334 Mon Sep 17 00:00:00 2001 +From: Marvin Scholz +Date: Fri, 12 Jul 2024 17:47:14 +0200 +Subject: [PATCH] avfilter/af_channelsplit: fix mixed declaration and code + +Fix a "mixing declarations and code is incompatible with standards +before C99" warning. +--- + libavfilter/af_channelsplit.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/libavfilter/af_channelsplit.c ++++ b/libavfilter/af_channelsplit.c +@@ -156,6 +156,7 @@ static int query_formats(AVFilterContext + + static int filter_frame(AVFilterLink *outlink, AVFrame *buf) + { ++ AVFrame *buf_out; + AVFilterContext *ctx = outlink->src; + ChannelSplitContext *s = ctx->priv; + const int i = FF_OUTLINK_IDX(outlink); +@@ -164,7 +165,7 @@ static int filter_frame(AVFilterLink *ou + + av_assert1(channel >= 0); + +- AVFrame *buf_out = av_frame_clone(buf); ++ buf_out = av_frame_clone(buf); + if (!buf_out) + return AVERROR(ENOMEM); +