[FFmpeg-devel] Metadata outputs null-terminated strings

Hendrik Leppkes h.leppkes at gmail.com
Fri Jul 8 14:18:13 EEST 2016


On Fri, Jul 8, 2016 at 12:33 PM, Sami Hult <sami.hult at gmail.com> wrote:
> Let me rephrase: avio_put_str, which in my patch is used instead of
> (forbidden) printf, outputs the terminating null-character with the string.
>

avio_put_str is intentionally designed to write the null-character as
termination as well, since its typical use is writing single strings
into media files - and those should be null-terminated.
If you want to write a text file, this is probably not the right function.

An alternative might be using the bprint API functions, and store the
string in memory until its complete.

- Hendrik


More information about the ffmpeg-devel mailing list