aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo_enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-15 14:50:37 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-03-15 14:56:42 +0100
commit06a3185e38614ff22e4586675b85228f07819452 (patch)
treead30f298c5116504455a0c14eaf730a2f57d68c5 /libavcodec/mpegvideo_enc.c
parentda89572004f6c0279134d4c8c1c835496a2c4232 (diff)
downloadffmpeg-06a3185e38614ff22e4586675b85228f07819452.tar.gz
avcodec/mpegvideo_enc: dont use direct mode for unaligned input
Fixes Ticket3456 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r--libavcodec/mpegvideo_enc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 6bc510249f..7e081a5bc0 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1039,6 +1039,10 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
direct = 0;
if ((s->width & 15) || (s->height & 15))
direct = 0;
+ if (((intptr_t)(pic_arg->data[0])) & (STRIDE_ALIGN-1))
+ direct = 0;
+ if (s->linesize & (STRIDE_ALIGN-1))
+ direct = 0;
av_dlog(s->avctx, "%d %d %td %td\n", pic_arg->linesize[0],
pic_arg->linesize[1], s->linesize, s->uvlinesize);