James Almer (12025-01-22): > New fields can be added this way too. The reason i didn't make it a struct > is that i wanted to introduce the least amount of new public > defines/symbols, thus reusing the packet side data implementation.
Let us make the packet side data a struct too. This version is terrible design that puts a lot of burden on all sides of the code and wastes the ability of the compiler to check the structure, this is terrible design¹. Since the first field is a flag, we can easily make a compatibility layer by adding a AV_SIDE_DATA_PARAM_CHANGE_STRUCT_API flag. And we can dispense with all the _alloc() and _free() API in libavutil and let the applications allocate as they want, including on the stack, the code just needs to check size before accessing a field. Later let us fix the other side data that use this pattern. 1: One `git blame` later… yeah, not surprised. Regards, -- Nicolas George _______________________________________________ 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".