diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2010-07-21 21:40:50 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2010-07-21 21:40:50 +0000 |
commit | b0335fd9571aea1b60ee03b5bffd7904fe4efddf (patch) | |
tree | efde6c22c00a30c2c8d90f012d49579cb93ed1b3 /libavformat/internal.h | |
parent | a43416a54030f0cdf921ff4bd3e22bbe412ff603 (diff) | |
download | ffmpeg-b0335fd9571aea1b60ee03b5bffd7904fe4efddf.tar.gz |
document ff_get_line()
Originally committed as revision 24401 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/internal.h')
-rw-r--r-- | libavformat/internal.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/internal.h b/libavformat/internal.h index b746c1dd5c..232b40b253 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -167,6 +167,17 @@ int ff_get_v_length(uint64_t val); */ void ff_put_v(ByteIOContext *bc, uint64_t val); +/** + * Read a whole line of text from ByteIOContext. Stop reading after reaching + * either a \n, a \0 or EOF. The returned string is always \0 terminated, + * and may be truncated if the buffer is too small. + * + * @param s the read-only ByteIOContext + * @param buf buffer to store the read line + * @param maxlen size of the buffer + * @return the length of the string written in the buffer, not including the + * final \0 + */ int ff_get_line(ByteIOContext *s, char *buf, int maxlen); #define SPACE_CHARS " \t\r\n" |