diff options
author | Jindrich Makovicka <makovick@gmail.com> | 2013-05-16 16:49:28 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-05-17 07:49:05 +0200 |
commit | 259af1b92370b32f6d0b9a6de314db4b44c2481d (patch) | |
tree | e648130ea181b2c06b9d0fe82c43e8ff0787b734 /libavcodec/mpegvideo.c | |
parent | db8e336e5fc18c41cb4e9bab1960349e9800d546 (diff) | |
download | ffmpeg-259af1b92370b32f6d0b9a6de314db4b44c2481d.tar.gz |
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>
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index d958b962a1..b5f1587178 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -205,7 +205,7 @@ int ff_mpv_frame_size_alloc(MpegEncContext *s, int linesize) FF_ALLOCZ_OR_GOTO(s->avctx, s->edge_emu_buffer, alloc_size * 2 * 24, fail); - FF_ALLOCZ_OR_GOTO(s->avctx, s->me.scratchpad, alloc_size * 2 * 16 * 2, + FF_ALLOCZ_OR_GOTO(s->avctx, s->me.scratchpad, alloc_size * 2 * 16 * 3, fail) s->me.temp = s->me.scratchpad; s->rd_scratchpad = s->me.scratchpad; |