From 4edfceccec5a4f5f62415904dd008a2ab23f5d83 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 21 Mar 2008 22:17:56 +0000 Subject: [PATCH] Document get_*_buffer() Originally committed as revision 12548 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/avio.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libavformat/avio.h b/libavformat/avio.h index b9a4997801..61459c5391 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -260,7 +260,19 @@ char *url_fgets(ByteIOContext *s, char *buf, int buf_size); void put_flush_packet(ByteIOContext *s); + +/** + * Reads size bytes from ByteIOContext into buf. + * @returns number of bytes read or AVERROR + */ int get_buffer(ByteIOContext *s, unsigned char *buf, int size); + +/** + * Reads size bytes from ByteIOContext into buf. + * This reads at most 1 packet. If thats not enough fewer bytes will be + * returned. + * @returns number of bytes read or AVERROR + */ int get_partial_buffer(ByteIOContext *s, unsigned char *buf, int size); /** @note return 0 if EOF, so you cannot use it if EOF handling is