On Thu, 8 Nov 2018, François Revol wrote:

Hi,

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.

Regards,
Marton
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to