Mercurial > libavformat.hg
changeset 4821:810c0bbb435e libavformat
Describe read_alloc return value and required pkt handling to avoid memleaks
author | reimar |
---|---|
date | Tue, 07 Apr 2009 21:10:10 +0000 |
parents | bb26039e5f8c |
children | a751c4815d2d |
files | avformat.h |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/avformat.h Tue Apr 07 20:52:37 2009 +0000 +++ b/avformat.h Tue Apr 07 21:10:10 2009 +0000 @@ -249,7 +249,10 @@ 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 */