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

Vittorio Giovara vittorio.giovara at gmail.com
Mon Jul 7 19:04:27 EEST 2025


On Thu, Jul 3, 2025 at 11:08 AM Nicolas George <george at nsup.org> wrote:

> Marvin Scholz (HE12025-06-25):
> > 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...
>
> It is not just a matter of saving a few cycles. What you propose
> requires writing more code, including error checks and an occasion for
> failure.
>
> If it was new code, I would consider it, but changing existing code that
> has been working for years to make it more verbose, more failure prone
> and less efficient, no, thanks.
>
> Let us just document that it is a valid use.


Disagree here, by that reasoning we should never touch code already written.

Also it does not seem very much valid behavior, we should avoid introducing
more hacks.

IMO the proposed changes are good to go.
-- 
Vittorio


More information about the ffmpeg-devel mailing list