[FFmpeg-cvslog] lavc: clarify get_buffer() documentation

Justin Ruggles git at videolan.org
Mon Nov 26 14:36:53 CET 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Sun Nov 25 11:37:14 2012 -0500| [8e134e5104e99a69cd4cea10540a7ce9c3682a2c] | committer: Justin Ruggles

lavc: clarify get_buffer() documentation

This is needed for the AAC decoder, which may need to call get_buffer()
more than once if the channel configuration changes.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8e134e5104e99a69cd4cea10540a7ce9c3682a2c
---

 libavcodec/avcodec.h |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 58ea1bc..5e358ca 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2218,7 +2218,12 @@ typedef struct AVCodecContext {
      *
      * Decoders cannot use the buffer after returning from
      * avcodec_decode_audio4(), so they will not call release_buffer(), as it
-     * is assumed to be released immediately upon return.
+     * is assumed to be released immediately upon return. In some rare cases,
+     * a decoder may need to call get_buffer() more than once in a single
+     * call to avcodec_decode_audio4(). In that case, when get_buffer() is
+     * called again after it has already been called once, the previously
+     * acquired buffer is assumed to be released at that time and may not be
+     * reused by the decoder.
      *
      * As a convenience, av_samples_get_buffer_size() and
      * av_samples_fill_arrays() in libavutil may be used by custom get_buffer()



More information about the ffmpeg-cvslog mailing list