Commit deaf5e76 authored by faust3's avatar faust3

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20215 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 33848ccb
...@@ -3228,9 +3228,11 @@ attribute_deprecated int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *s ...@@ -3228,9 +3228,11 @@ attribute_deprecated int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *s
/** /**
* Decodes the audio frame of size avpkt->size from avpkt->data into samples. * Decodes the audio frame of size avpkt->size from avpkt->data into samples.
* Some decoders may support multiple frames in a single AVPacket, such * 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 * 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. * decompressed frame size in bytes.
* *
* @warning You must set frame_size_ptr to the allocated size of the * @warning You must set frame_size_ptr to the allocated size of the
...@@ -3260,7 +3262,7 @@ attribute_deprecated int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *s ...@@ -3260,7 +3262,7 @@ attribute_deprecated int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *s
* data and size, some decoders might in addition need other fields. * data and size, some decoders might in addition need other fields.
* All decoders are designed to use the least fields possible though. * All decoders are designed to use the least fields possible though.
* @return On error a negative value is returned, otherwise the number of bytes * @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 avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples,
int *frame_size_ptr, int *frame_size_ptr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment