[FFmpeg-devel] [PATCH 1/2] avformat/tee: refactor option processing

Marvin Scholz epirat07 at gmail.com
Wed Jun 25 15:04:40 EEST 2025



On 25 Jun 2025, at 13:23, Nicolas George wrote:

> Marvin Scholz (HE12025-06-25):
>> Instead of the convoluted nested macros, use a convenience
>> helper function. While this makes the code slightly longer, it
>> is now much clearer what is happening without running the file
>> through a preprocessor first.
>
> I do not find the modified code clearer than the original. Quite the
> opposite in fact; there is no need to “run[] the file through a
> preprocessor”, the code is clear enough.

Well, I obviously disagree, but tastes are different...

>
>> Additionally do not mess with the internals of the dictionary,
>> just to save two string copies.
>
> Should be in a separate patch.
>

Would you be fine with just the removal of the messing with
the AVDictionary entries then, leaving the macros in place,
essentially removing STEAL_OPTION and doing a copy in CONSUME_OPTION?

IMHO saving two copies of a string does not justify abusing the
AVDictionary API in such a way. This isnt a hot code path either
where this would make sense...

> Regards,
>
> -- 
>   Nicolas George
> _______________________________________________
> 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