[FFmpeg-devel] [PATCH] avformat/dhav: Do not evaluate avio_size() multiple times

Michael Niedermayer michael at niedermayer.cc
Sat Jun 7 20:38:53 EEST 2025


On Sat, Jun 07, 2025 at 05:23:26PM +0100, Derek Buitenhuis wrote:
> On 6/7/2025 12:12 AM, Michael Niedermayer wrote:
> > Code like FFMIN(MAX_DURATION_BUFFER_SIZE, avio_size(s->pb)) is not safe
> > as FFMIN() is a macro and avio_size() is thus evaluated multiple
> > times
> > 
> > CC: Justin Ruggles <justinr at vimeo.com>
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> >  libavformat/dhav.c | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> LGTM.

will apply

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Never trust a computer, one day, it may think you are the virus. -- Compn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250607/142f3718/attachment.sig>


More information about the ffmpeg-devel mailing list