[FFmpeg-devel] [PATCH 2/2] avutil/log: Use bprint for part
Nicolas George
nicolas.george at normalesup.org
Sat Aug 10 17:21:12 CEST 2013
Le tridi 23 thermidor, an CCXXI, Michael Niedermayer a écrit :
> This should fix the issue with strings longer than 1024
>
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
> libavutil/log.c | 45 ++++++++++++++++++++++++++-------------------
> 1 file changed, 26 insertions(+), 19 deletions(-)
I see nothing wrong with this patch.
But reading the original code, I believe it can be made simpler and do
without a dynamic buffer. Avoiding memory allocation in low level log
functions that may be used to report OOM issues seems like a good idea.
The basic idea would be to sanitize on the fly or by blocks, inside
colored_fputs, and possibly use a hash context to avoid duplicate lines.
Added to my TODO list.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130810/02722db7/attachment.asc>
More information about the ffmpeg-devel
mailing list