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

Michael Bradshaw mjbshaw at gmail.com
Sat Mar 16 20:17:40 CET 2013


On Fri, Mar 8, 2013 at 10:58 PM, Michael Bradshaw <mjbshaw at gmail.com> wrote:

> 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

More information about the ffmpeg-devel mailing list