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

Michael Niedermayer michael at niedermayer.cc
Sun Dec 25 04:20:01 EET 2016


On Sun, Dec 25, 2016 at 02:00:13AM +0100, Nicolas George wrote:
> 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?

i meant the _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.

Whats your oppinion on using a explicit av_assert1() in the calling
code for this ? (i assume it can be done easily&cleanly)

It would explicitly in C code say what is meant, while a
"_sure" requires additional knowledge specific to lavfi

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Modern terrorism, a quick summary: Need oil, start war with country that
has oil, kill hundread thousand in war. Let country fall into chaos,
be surprised about raise of fundamantalists. Drop more bombs, kill more
people, be surprised about them taking revenge and drop even more bombs
and strip your own citizens of their rights and freedoms. to be continued
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161225/9dbffb4b/attachment.sig>


More information about the ffmpeg-devel mailing list