Nicolas George: > 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. > The examples that this command shows you do not only de-duplicate in the source (like it is done here in vsrc_testsrc.c), but really in the binary. And it works (for it not to work the AVOpt API would need to be modified to e.g. store the addresses of all the AVOption arrays that it has received so far and compare whether a AVOption * actually points into an array already known; and of course it would have to error out/abort for it to matter).
> 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? - Andreas _______________________________________________ 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".