2017-03-07 12:30 GMT+01:00 Michał Krasowski <mkrasow...@opera.com>: >>> There are few things that are still not clear to me: >>> * Why is the 32 bit padding used when the doc says that >>> 64 bit offset may also be needed? >> >>I don't understand your question but you may want to >>send an update for this sentence. > > I mean that the doc says: >> * This is mainly needed because some optimized bitstream readers read >> * 32 or 64 bit at once and could read over the end.<br> > So in case of reading 64 bits at once, may it be the case that 8 bytes padding > is needed?
(No, 32 bytes are - curently - always needed, see Hendrik's email.) The relevant line is the definition of AV_INPUT_BUFFER_PADDING_SIZE Your code should look similar to: uint8_t *ptr = av_malloc(buffer_size + AV_INPUT_BUFFER_PADDING_SIZE); And a zero-initialization of the padding. Carl Eugen _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel