Hi everyone! I was trying to use a custom log callback and noticed that this pretty much requires using av_log_format_line(), as the interpretation of the format string is not trivial.
Unfortunately this approach offers no way of determining the size of the output buffer for the log message. Typically in such a situation, one would do two calls to snprintf - one with the buffer set to NULL which then gives the required buffer size as a return value and then a second call to perform the actual copy of the message. I noticed that ffmpeg internally simply uses a hardcoded buffer size of 1024, which might be fine for most cases, but probably not all. My question is, could we change the return value of av_log_format_line (which currently returns void) to returns the number of characters written to its `line` argument, or the number of characters which would have been written if that argument is set to NULL? Since av_log_format_line calls snprintf internally, that might be as trivial as just forwarding the return value from that call. Thanks & regards, Andreas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel