]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Describe read_alloc return value and required pkt handling to avoid memleaks
authorreimar <reimar@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 7 Apr 2009 21:10:10 +0000 (21:10 +0000)
committerreimar <reimar@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 7 Apr 2009 21:10:10 +0000 (21:10 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18358 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavformat/avformat.h

index f30c37e0b49a3de6b82674207110b5d691d94fb4..128ecc51215ed9416012bedd751e7dce8f6dff5a 100644 (file)
@@ -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 */