[FFmpeg-devel] [PATCH 16/16] avfilter/vsrc_testsrc: Deduplicate options

James Almer jamrial at gmail.com
Mon Jan 4 21:35:30 EET 2021


On 1/4/2021 4:29 PM, Nicolas George wrote:
> Andreas Rheinhardt (12021-01-04):
>> What enumerating code? It is actually commonplace that options are
>> shared (you can find examples in libavfilter by using 'git grep -e
>> define --and -e options'); pointing into other options and thereby
>> reusing only a part of other options is not common, but I don't really
>> see why it shouldn't work.
> 
> Using #define to de-duplicate the source is fine, of course.
> 
> But IIRC pointing to the same array, i.e. de-duplicating in the binary,
> will lead to the code that enumerate options to loop in some way. I do
> not remember the details, and I cannot find a commit that talks about
> it, sorry. Maybe somebody here remembers better?
> 
> Regards,

I recall issues with modules sharing a common AVClass, but different 
AVClasses sharing a common array of AVOptions seems to be ok.
See rawdec.h in libavformat, and how ff_raw_options is used in several 
different demuxer AVClasses.

> 
> 
> _______________________________________________
> 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