[libav-api] FF_INPUT_BUFFER_PADDING_SIZE with av_read_frame

Chris Stankevitz chrisstankevitz at yahoo.com
Sat Mar 26 20:00:29 CET 2011


Hello,

Please identify any false statements:

1. I am supposed to use avcodec_decode_video2 and not avcodec_decode_video

2. avcodec_decode_video2 takes as input a AVPacket (and not a uint8* buffer as avcodec_decode_video does)

3. avcodec_decode_video2 requires "The input buffer must be FF_INPUT_BUFFER_PADDING_SIZE larger than the actual read bytes because some optimized bitstream readers read 32 or 64 bits at once and could read over the end."

4. (3) Is referring to AVPacket::buffer

5. I do not allocate AVPacket::buffer

6. somebody_else allocates AVPacket::buffer (av_read_frame?)

7. (3) should be adhered to by somebody_else.

8. I can safely ignore (3)

9. avcodec_decode_video2 requires "The end of the input buffer buf should be set to 0 to ensure that no overreading happens for damaged MPEG streams."

10. For similar reasons, I can also safely ignore (9)

Thank you,

Chris


      


More information about the libav-api mailing list