diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-01-23 12:38:27 +0100 |
---|---|---|
committer | Janne Grunau <janne-ffmpeg@jannau.net> | 2011-01-25 21:48:03 +0100 |
commit | 93b78d12106112d7c5d9cfdcf96fc3dce9dc5f82 (patch) | |
tree | 3e5e25a025258e0ca817390e24c6a96d64428452 /libavformat/avio.h | |
parent | d0f0f6287c7fd29474e58fe1b86db2885f20c457 (diff) | |
download | ffmpeg-93b78d12106112d7c5d9cfdcf96fc3dce9dc5f82.tar.gz |
lavf: make a variant of ff_get_str16_nolen public
It will be useful in mp3 demuxer and hopeful some other places.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
Diffstat (limited to 'libavformat/avio.h')
-rw-r--r-- | libavformat/avio.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/avio.h b/libavformat/avio.h index b35d4c716c..a606f7cb97 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -460,6 +460,15 @@ unsigned int get_le32(ByteIOContext *s); uint64_t get_le64(ByteIOContext *s); unsigned int get_le16(ByteIOContext *s); +/** + * Read a UTF-16 string from pb and convert it to UTF-8. + * The reading will terminate when either a null or invalid character was + * encountered or maxlen bytes have been read. + * @return number of bytes read (is always <= maxlen) + */ +int avio_get_str16le(ByteIOContext *pb, int maxlen, char *buf, int buflen); +int avio_get_str16be(ByteIOContext *pb, int maxlen, char *buf, int buflen); + char *get_strz(ByteIOContext *s, char *buf, int maxlen); unsigned int get_be16(ByteIOContext *s); unsigned int get_be24(ByteIOContext *s); |