[Libav-user] Video buffer padding

Tony Glover T.Glover at nottingham.ac.uk
Wed Oct 24 11:53:27 CEST 2012


Hi Tim,
	You should set aside enough buffer space to hold your data AND the extra padding to it and ensure that the extra padding is set to zero. Something like this would suffice :-

If you have copied the incoming data to your buffer, e.g memcpy(mPkt->data, data, dataSize);
Then you should pad it thus - memset(mPkt->data + mPkt->size, 0, FF_INPUT_BUFFER_PADDING_SIZE);

Or something similar depending on how you copy your incoming data to your own buffer, just ensure that the size of your buffer is big enough to hold your incoming data as well as the padding.

Cheers,

Tony.

This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.


More information about the Libav-user mailing list