# HG changeset patch # User faust3 # Date 1255377031 0 # Node ID c857cd6b77b6ee492f62ad5af821da8d72209d76 # Parent 08e50bcdcbf16f1e5815f53c1502c08a8d503dbe extend description of avcodec_decode_audio3: - clarify when 0 is returned - explain that decode_audio3 has to be called multiple times when there are multiple frames in a single packet diff -r 08e50bcdcbf1 -r c857cd6b77b6 avcodec.h --- a/avcodec.h Mon Oct 12 14:46:53 2009 +0000 +++ b/avcodec.h Mon Oct 12 19:50:31 2009 +0000 @@ -3228,9 +3228,11 @@ /** * Decodes the audio frame of size avpkt->size from avpkt->data into samples. * Some decoders may support multiple frames in a single AVPacket, such - * decoders would then just decode the first frame. + * decoders would then just decode the first frame. In this case, + * avcodec_decode_audio3 has to be called again with an AVPacket that contains + * the remaining data in order to decode the second frame etc. * If no frame - * could be decompressed, frame_size_ptr is zero. Otherwise, it is the + * could be outputted, frame_size_ptr is zero. Otherwise, it is the * decompressed frame size in bytes. * * @warning You must set frame_size_ptr to the allocated size of the @@ -3260,7 +3262,7 @@ * data and size, some decoders might in addition need other fields. * All decoders are designed to use the least fields possible though. * @return On error a negative value is returned, otherwise the number of bytes - * used or zero if no frame could be decompressed. + * used or zero if no frame data was decompressed (used) from the input AVPacket. */ int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr,