[FFmpeg-devel] [PATCH 08/17] lavfi: add helpers to consume frames from link FIFOs.

Nicolas George george at nsup.org
Sun Dec 25 03:00:13 EET 2016


Le quintidi 5 nivôse, an CCXXV, Michael Niedermayer a écrit :
> Why do these functions exist twice ?
> the API would be simpler with just one set

You mean the _samples / _frame versions, or the normal / _sure versions?

The _samples / _frame case seemed easier than distinguishing using
special values of the arguments.

The normal / _sure are useful to express that availability check has
already done.

That way, if the check is or becomes invalid (maybe because someone adds
a special case between the test and the use) it is detected by an assert
failure during FATE rather than become an ignored error code. I caught
quite a few mistakes that way.

But of course, it can be discussed.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161225/f68adba1/attachment.sig>


More information about the ffmpeg-devel mailing list