[FFmpeg-devel] [PATCH 1/3] lavu/frame: add av_frame_check_align().

Nicolas George george at nsup.org
Thu May 18 12:16:03 EEST 2017


Le nonidi 29 floréal, an CCXXV, Hendrik Leppkes a écrit :
> I think its a saner choice to design the API to try to avoid instant
> heap corruption, instead of hoping every case sets the alignment
> properly in all cases.
> A single if condition shouldn't be too much trouble, we already flag
> hardware pixel formats as such in the pixdesc to identify them.

Giving an incorrect alignment value to this function will not cause an
"instant heap corruption", you are burning a straw man.

This function performs a simple task: it checks the alignment of a
frame, given as a parameter, against a required alignment value, given
as a parameter. Simple, straightforward, predictable.

Adding special cases to this function would break these properties.

Also, I am roughly one bikeshedding mail away from losing interest in
this whole matter.

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/20170518/b35eb1a1/attachment.sig>


More information about the ffmpeg-devel mailing list