# HG changeset patch # User reimar # Date 1239138610 0 # Node ID 810c0bbb435ef411700b2d5a0bdaf2ebf59abd72 # Parent bb26039e5f8c80439352e02c262bfc5d9ed17e05 Describe read_alloc return value and required pkt handling to avoid memleaks diff -r bb26039e5f8c -r 810c0bbb435e avformat.h --- 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 */