summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-04-07 21:10:10 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-04-07 21:10:10 +0000
commit6883ebe4b994dd6acd60e9aee789579db6b5a395 (patch)
tree80ceafd5ffccefdc7e7364268672d57658ee78c1 /libavformat
parent4e5735f77429d11a3c981080d8f2177c86c2d929 (diff)
Describe read_alloc return value and required pkt handling to avoid memleaks
Originally committed as revision 18358 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avformat.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index f30c37e0b4..128ecc5121 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -249,7 +249,10 @@ typedef struct AVInputFormat {
AVFormatParameters *ap);
/** Read one packet and put it in 'pkt'. pts and flags are also
set. 'av_new_stream' can be called only if the flag
- AVFMTCTX_NOHEADER is used. */
+ AVFMTCTX_NOHEADER is used.
+ @return 0 on success, < 0 on error.
+ When returning an error, pkt must not have been allocated
+ or must be freed before returning */
int (*read_packet)(struct AVFormatContext *, AVPacket *pkt);
/** Close the stream. The AVFormatContext and AVStreams are not
freed by this function */