[FFmpeg-devel] [PATCH] libavformat/ffmetadec: use dynamic allocation for line buffer
cus at passwd.hu
Fri Nov 9 11:06:39 EET 2018
On Thu, 8 Nov 2018, François Revol wrote:
> Le 08/11/2018 à 20:50, Michael Niedermayer a écrit :
>>> + line = av_malloc(line_size);
>>> + if (!line)
>>> + return AVERROR(ENOMEM);
>> this would use alot of memory for large files, also avio_size() will not
>> work with all inputs
> Yes I thought so as well, that was a quick fix for a friend in need.
>> using av_fast_realloc() or similar should avoid both issues
> You mean, having get_line() reallocate 1kB more each time it runs out
> without finding a \n?
You should convert everything to use an AVBprint buffer.
More information about the ffmpeg-devel