mpegvideo: allocate sufficiently large scratch buffer for interlaced vid
authorJindrich Makovicka <makovick@gmail.com>
Thu, 16 May 2013 14:49:28 +0000 (16:49 +0200)
committerAnton Khirnov <anton@khirnov.net>
Fri, 17 May 2013 05:49:05 +0000 (07:49 +0200)
commit259af1b92370b32f6d0b9a6de314db4b44c2481d
treee648130ea181b2c06b9d0fe82c43e8ff0787b734
parentdb8e336e5fc18c41cb4e9bab1960349e9800d546
mpegvideo: allocate sufficiently large scratch buffer for interlaced vid

MPV_decode_mb_internal needs 3 * 16 * linesize bytes of scratch buffer

For interlaced content, linesize is multiplied by two after the allocation
of the scratch buffer, and the dest_cr pointer ends past the buffer.

This patch makes ff_mpv_frame_size_alloc allocate a total of
(aligned line_size) * 2 * 16 * 3 bytes, which suffices even for the
interlaced case.

CC:libav-stable@libav.org

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/mpegvideo.c