Quoting wm4 (2017-02-08 12:08:18) > On Wed, 8 Feb 2017 11:50:58 +0100 > Anton Khirnov <[email protected]> wrote: > > > This will avoid every caller from hardcoding some specific alignment, > > which may break in the future with new instruction sets. > > --- > > > * @param frame frame in which to store the new buffers. > > - * @param align required buffer size alignment > > + * @param align Required buffer size alignment. If equal to 0, alignment > > will be > > + * chosen automatically for the current CPU. It is highly > > + * recommended to pass 0 here unless you know what you are > > doing. > > * > > * @return 0 on success, a negative AVERROR on error. > > */ > > This implicitly changes the meaning of "0" from no alignment > (equivalent to 1) to some random alignment. I don't think that's very > safe. Why not make -1 the magic value that enables automatic alignment?
0 is not "no alignment", 0 is invalid for video and I think will do something random right now. For audio, 0 already means automatic. So I'm not changing the behaviour of any valid code. -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
