[FFmpeg-devel] [PATCH 1/3] lavfi/metal: fix mixing declarations and code warning

"zhilizhao(赵志立)" quinkblack at foxmail.com
Mon Apr 3 16:29:00 EEST 2023



> On Apr 3, 2023, at 20:25, Jun Zhao <mypopydev at gmail.com> wrote:
> 
> fix mixing declarations and code warning
> 
> Signed-off-by: Jun Zhao <barryjzhao at tencent.com>
> ---
> libavfilter/vf_yadif_videotoolbox.m | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)

I have noticed the -Wdeclaration-after-statement flag has been applied
on Objective-C, but I’m not sure whether the rule should applies or not.

> 
> diff --git a/libavfilter/vf_yadif_videotoolbox.m b/libavfilter/vf_yadif_videotoolbox.m
> index 69186c2254..3656a673b3 100644
> --- a/libavfilter/vf_yadif_videotoolbox.m
> +++ b/libavfilter/vf_yadif_videotoolbox.m
> @@ -208,6 +208,7 @@ static av_cold int do_init(AVFilterContext *ctx) API_AVAILABLE(macos(10.11), ios
>     YADIFVTContext *s = ctx->priv;
>     NSError *err = nil;
>     CVReturn ret;
> +    dispatch_data_t libData;
> 
>     s->mtlDevice = MTLCreateSystemDefaultDevice();
>     if (!s->mtlDevice) {
> @@ -217,7 +218,7 @@ static av_cold int do_init(AVFilterContext *ctx) API_AVAILABLE(macos(10.11), ios
> 
>     av_log(ctx, AV_LOG_INFO, "Using Metal device: %s\n", s->mtlDevice.name.UTF8String);
> 
> -    dispatch_data_t libData = dispatch_data_create(
> +    libData = dispatch_data_create(
>         ff_vf_yadif_videotoolbox_metallib_data,
>         ff_vf_yadif_videotoolbox_metallib_len,
>         nil,
> -- 
> 2.25.1
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-devel mailing list