[FFmpeg-devel] [PATCH 2/3] avcodec: use the new event flags field instead of setting AVFrame.palette_has_changed

Anton Khirnov anton at khirnov.net
Wed Apr 12 14:55:52 EEST 2023


Quoting James Almer (2023-04-12 13:26:48)
> On 4/12/2023 5:09 AM, Anton Khirnov wrote:
> > Quoting James Almer (2023-04-11 22:38:50)
> >> diff --git a/doc/APIchanges b/doc/APIchanges
> >> index 59216231f9..85060768b3 100644
> >> --- a/doc/APIchanges
> >> +++ b/doc/APIchanges
> >> @@ -4,6 +4,7 @@ API changes, most recent first:
> >>   
> >>   2023-04-11 - xxxxxxxxxx - lavc 60.10.100 - avcodec.h
> >>     Add event_flags to AVCodecContext.
> >> +  Add AVCTX_EVENT_FLAG_PALETTE_HAS_CHANGED.
> > 
> > I think we should first figure out how is the field supposed to be
> > useful to our users. Maybe it's not and we can just remove it.
> 
> That's fine. I have no idea if it's actually used or useful (You can 
> always just memcmp(prev->data[1], cur->data[1], 256) on every frame 
> after all), but removing without replacement tends to be controversial, 
> hence why i did this.

E.g. if the field is supposed to be useful in filters, then your change
would break that use case.

More generally I don't think we should be adding new APIs with no
understanding of how they are supposed to be used. Deprecating that
field entirely and waiting for someone to object seems better to me.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list