some codecs need / can use extra-data like huffman tables. mjpeg: huffman tables rv10: additional flags mpeg4: global headers (they can be in the bitstream or here) the allocated memory should be FF_INPUT_BUFFER_PADDING_SIZE bytes larger then extradata_size to avoid prolems if its read with the bitstream reader the bytewise contents of extradata must not depend on the architecture or cpu endianness