According to the comment for avcodec_decode_video(), the input buffer must be padded 8 bytes since the bitstream readers can overread. QuickTime overallocates the buffers it gives us, so this normally wouldn't be a problem, but the changes in ffmpeg's r6942 and r6953 cause random image corruption with the error "slice end not reached but screenspace end". This seems to be because the overreading is treating junk data as real data. A comment in apiexample.c suggests that we should set this 8-byte padding to 0, and this seems to fix the corruption. Since it's probably not such a good idea to modify the buffer that QuickTime gives us outside of the boundary that QT tells us about, make our own copy of the input data to pad with zeros.
According to the comment for avcodec_decode_video(), the input buffer must be padded 8 bytes since the bitstream readers can overread. QuickTime overallocates the buffers it gives us, so this normally wouldn't be a problem, but the changes in ffmpeg's r6942 and r6953 cause random image corruption with the error "slice end not reached but screenspace end". This seems to be because the overreading is treating junk data as real data. A comment in apiexample.c suggests that we should set this 8-byte padding to 0, and this seems to fix the corruption.
Since it's probably not such a good idea to modify the buffer that QuickTime gives us outside of the boundary that QT tells us about, make our own copy of the input data to pad with zeros.


git-svn-id: d8f21eb7283bfb39ebab2f8f9b4a259b233f9348@212 621663c8-3916-0410-8f58-edc14a8543d5

mrvacbob/perian,mrvacbob/perian,mrvacbob/perian,mrvacbob/perian,mrvacbob/perian