[FFmpeg-cvslog] r18358 - trunk/libavformat/avformat.h

reimar subversion
Tue Apr 7 23:10:10 CEST 2009


Author: reimar
Date: Tue Apr  7 23:10:10 2009
New Revision: 18358

Log:
Describe read_alloc return value and required pkt handling to avoid memleaks

Modified:
   trunk/libavformat/avformat.h

Modified: trunk/libavformat/avformat.h
==============================================================================
--- trunk/libavformat/avformat.h	Tue Apr  7 22:52:37 2009	(r18357)
+++ trunk/libavformat/avformat.h	Tue Apr  7 23:10:10 2009	(r18358)
@@ -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 */



More information about the ffmpeg-cvslog mailing list