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

Michael Niedermayer michaelni at gmx.at
Sat Mar 23 13:34:58 CET 2013


On Fri, Mar 08, 2013 at 10:58:42PM -0700, Michael Bradshaw 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

>  audio_fifo.h |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> bc26b6f65027a04b4ee05193de279623f3ecf6c2  0001-Make-audio-FIFO-read-write-contracts-more-strict.patch
> From a827f3996a08f11b0007390cea644348b3f1db6a Mon Sep 17 00:00:00 2001
> From: Michael Bradshaw <mjbshaw at gmail.com>
> Date: Fri, 8 Mar 2013 22:48:43 -0700
> Subject: [PATCH] Make audio FIFO read/write contracts more strict

patch applied

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130323/0ff3731b/attachment.asc>


More information about the ffmpeg-devel mailing list