[FFmpeg-devel] Metadata outputs null-terminated strings

Sami Hult sami.hult at gmail.com
Fri Jul 8 15:36:58 EEST 2016

On 8 July 2016 at 14:18, Hendrik Leppkes <h.leppkes at gmail.com> wrote:

> 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.
All right. The documentation is slightly unclear on the matter, should've
read the source. I suggest it be made clear in the api docs.


More information about the ffmpeg-devel mailing list