c++ - does av_read_frame add FF_INPUT_BUFFER_PADDING_SIZE? -


i'm using libav read mpeg stream.
i'm using function av_read_frame() read frames packets:

av_read_frame(pformatctx, &packet) 

i use function avcodec_decode_video2 decode packet frame.
documentation of function avcodec_decode_video2 contains following warning:

the input buffer must ff_input_buffer_padding_size larger actual read bytes because optimized bitstream readers read 32 or 64 bits @ once , read on end. end of input buffer buf should set 0 ensure no overreading happens damaged mpeg streams.

i wanted know if function av_read_frame doesn't allocate additional ff_input_buffer_padding_size?

thank you.

yes, av_read_frame() adds ff_input_buffer_padding_size you. need care if use own demuxed data input avcodec_decode_video2(), e.g. if write own demuxers (like vlc or mplayer do).


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -