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
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel