[FFmpeg-cvslog] Make audio FIFO read/write contracts more strict
Michael Bradshaw
git at videolan.org
Sat Mar 23 13:54:12 CET 2013
ffmpeg | branch: master | Michael Bradshaw <mjbshaw at gmail.com> | Fri Mar 8 22:48:43 2013 -0700| [2a97c5915b8f7ef8048c934b2047912873719568] | committer: Michael Niedermayer
Make audio FIFO read/write contracts more strict
Signed-off-by: Michael Bradshaw <mjbshaw at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2a97c5915b8f7ef8048c934b2047912873719568
---
libavutil/audio_fifo.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavutil/audio_fifo.h b/libavutil/audio_fifo.h
index 8c76388..55a538e 100644
--- a/libavutil/audio_fifo.h
+++ b/libavutil/audio_fifo.h
@@ -85,7 +85,8 @@ int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples);
* @param data audio data plane pointers
* @param nb_samples number of samples to write
* @return number of samples actually written, or negative AVERROR
- * code on failure.
+ * code on failure. If successful, the number of samples
+ * actually written will always be nb_samples.
*/
int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples);
@@ -99,7 +100,9 @@ int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples);
* @param data audio data plane pointers
* @param nb_samples number of samples to read
* @return number of samples actually read, or negative AVERROR code
- * on failure.
+ * on failure. The number of samples actually read will not
+ * be greater than nb_samples, and will only be less than
+ * nb_samples if av_audio_fifo_size is less than nb_samples.
*/
int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples);
More information about the ffmpeg-cvslog
mailing list