On Wed, 23 Jul 2025 18:11:23 +0200 Kacper Michajlow <kaspe...@gmail.com> wrote:
> On Wed, 23 Jul 2025 at 15:57, Niklas Haas <ffm...@haasn.xyz> wrote:
> >
> > From: Niklas Haas <g...@haasn.dev>
> >
> > ---
> >  libavfilter/vf_showinfo.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
> > index c706d00c96..b564d03a84 100644
> > --- a/libavfilter/vf_showinfo.c
> > +++ b/libavfilter/vf_showinfo.c
> > @@ -887,6 +887,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
> > *frame)
> >
> >      dump_color_property(ctx, frame);
> >
> > +    if (desc->flags & AV_PIX_FMT_FLAG_ALPHA) {
> > +        const char *alpha_mode_str = av_alpha_mode_name(frame->alpha_mode);
> > +        if (!alpha_mode_str || frame->alpha_mode == 
> > AVALPHA_MODE_UNSPECIFIED)
> > +            av_log(ctx, AV_LOG_INFO, "alpha_mode:unknown\n");
>
> Looking at other patches you used `unspecified`, I don't know the
> distinction, but should be consistent about one name.

Fixed. Maybe we should settle on a clear naming convention for these
fields in general? The enums are all named _UNSPECIFIED, but av_color_*_name()
instead returns "unknown" for them, with the sole current exception of
av_chroma_location_name().

Maybe we should update all of these strings to match the formal enum name.

>
> > +        else
> > +            av_log(ctx, AV_LOG_INFO, "alpha_mode:%s\n", alpha_mode_str);
> > +    }
> > +
> >      return ff_filter_frame(inlink->dst->outputs[0], frame);
> >  }
> >
> > --
> > 2.50.1
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to