James Almer (12019-07-13):
> > +        uint8_t *tmp = av_fast_realloc(ctx->pass_data, &ctx->pass_size,
> > +                                      ctx->pass_pos + buf_size);
> Just use av_reallocp(). Each call will make the buffer bigger, so you're
> not really making use the no-op benefits from av_fast_realloc(), which
> only trigger if newsize <= size.

av_fast_realloc() also allocates 17/16 of the requested memory, which
makes the incremental building of a buffer linear instead of quadratic.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: PGP signature

_______________________________________________
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".

Reply via email to