Tony Glover <T.Glover@...> writes: > 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);
I don't think this is correct / accurate. The point of the padding is not that you add 0's to the pkt->size number of bytes of your input data, but that you make sure that the buffer that contains the number of bytes is FF_INPUT_BUFFER_PADDING_SIZE larger than pkt->size (ie was allocated with at least pkt->size + FF_INPUT_BUFFER_PADDING_SIZE). Please do not top-post here, Carl Eugen _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
