diff mbox series

[FFmpeg-devel,02/11] avfilter/af_channelsplit: fix mixed declaration and code

Message ID D2NQZKJWI96W.1VKVR2820P8JN@gmail.com
State Superseded
Headers show
Series [FFmpeg-devel,01/11] avdevice/audiotoolbox: fix mixed declaration and code | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Marvin Scholz July 12, 2024, 3:47 p.m. UTC
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(-)

Comments

Leo Izen July 14, 2024, 5:39 p.m. UTC | #1
On 7/12/24 11:47 AM, Marvin Scholz wrote:
> 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(-)
> 
> diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c
> index 43b2667750..b91195a4c6 100644
> --- a/libavfilter/af_channelsplit.c
> +++ b/libavfilter/af_channelsplit.c
> @@ -151,6 +151,7 @@ static int query_formats(AVFilterContext *ctx)
>   
>   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);
> @@ -159,7 +160,7 @@ static int filter_frame(AVFilterLink *outlink, AVFrame *buf)
>   
>       av_assert1(channel >= 0);
>   
> -    AVFrame *buf_out = av_frame_clone(buf);
> +    buf_out = av_frame_clone(buf);
>       if (!buf_out)
>           return AVERROR(ENOMEM);
>   

This LGTM, I submitted a similar patch.

- Leo Izen
diff mbox series

Patch

diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c
index 43b2667750..b91195a4c6 100644
--- a/libavfilter/af_channelsplit.c
+++ b/libavfilter/af_channelsplit.c
@@ -151,6 +151,7 @@  static int query_formats(AVFilterContext *ctx)
 
 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);
@@ -159,7 +160,7 @@  static int filter_frame(AVFilterLink *outlink, AVFrame *buf)
 
     av_assert1(channel >= 0);
 
-    AVFrame *buf_out = av_frame_clone(buf);
+    buf_out = av_frame_clone(buf);
     if (!buf_out)
         return AVERROR(ENOMEM);