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

mypopy at gmail.com mypopy at gmail.com
Sat Apr 8 15:17:40 EEST 2023


On Mon, Apr 3, 2023 at 9:29 PM "zhilizhao(赵志立)" <quinkblack at foxmail.com> wrote:
>
>
>
> > 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.
>
I will hold on the Objective-C part and push the other patches in the patch sets
> >
> > 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


More information about the ffmpeg-devel mailing list