[FFmpeg-devel] [PATCH v3] Added Turing codec interface for ffmpeg
wm4
nfxjfg at googlemail.com
Tue Dec 6 16:40:20 EET 2016
On Tue, 6 Dec 2016 11:35:49 -0300
James Almer <jamrial at gmail.com> wrote:
> On 12/6/2016 11:03 AM, wm4 wrote:
> >> +static void add_option(const char* current_option, optionContext* option_ctx)
> >> +{
> >> + int option_length = strlen(current_option);
> >> + if (option_ctx->buffer_filled + option_length + 1 > option_ctx->options_buffer_size) {
> >> + option_ctx->options_buffer_size += option_length + 1;
> >> + option_ctx->options = realloc(option_ctx->options, option_ctx->options_buffer_size);
> > Missing error handling, and maybe overflow handling. Also, we don't use
> > malloc/realloc/free, but av_malloc/av_realloc/av_free. I'm not sure why
> > we do this (it doesn't have much of a justification for realloc at
> > least), but it's probably better to be consistent.
>
> av_realloc() and av_realloc_array() will call _aligned_realloc() on windows
> instead of realloc().
Oh I see, av_free calls _aligned_free, and normal malloc/realloc/free
doesn't work with the Windows _aligned_* functions.
> There's also the memalign_hack codepath, but that's scheduled to go anyway.
Let's hope so.
More information about the ffmpeg-devel
mailing list