[FFmpeg-devel] [PATCH] Make audio FIFO read/write contracts more strict

Michael Bradshaw mjbshaw at gmail.com
Sat Mar 9 06:58:42 CET 2013


Hi,

The attached patch adds some documentation
to av_audio_fifo_write/av_audio_fifo_read to make the function contracts
more strict. Currently, the actual number of samples read/written is not
defined or clarified. The audio FIFO is incredibly useful, but without
making the function contracts more strict there's no real guarantee about
the number of bytes written or read, which means "proper" code (that
actually checks return values) has to add extra complexity to deal with
impractical situations.

No code changes are necessary to comply with the more strict contracts; I
wrote the contracts to specifically match the currently (sensible) code.

Thanks,

Michael Bradshaw
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-audio-FIFO-read-write-contracts-more-strict.patch
Type: application/octet-stream
Size: 1669 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130308/6a3ee7ff/attachment.obj>


More information about the ffmpeg-devel mailing list