diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-20 16:36:02 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-20 17:04:57 +0100 |
commit | d08dd3286369964cd0476ddaa037a1193e9adcde (patch) | |
tree | d96d29c148cbd2404a75f1206f4a546db07865a7 | |
parent | ea4b477a1b3c2c7cda8cb62a986691cdb7b1cac4 (diff) | |
download | ffmpeg-d08dd3286369964cd0476ddaa037a1193e9adcde.tar.gz |
avcodec/mpegvideo_enc: disable direct mode in load_input_picture() for dimensions%16 != 0
We currently read a whole 16x16 block from the input at a few places
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index aca1baec81..62c93458b7 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1035,6 +1035,8 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) direct = 0; if (pic_arg->linesize[2] != s->uvlinesize) direct = 0; + if ((s->width & 15) || (s->height & 15)) + direct = 0; av_dlog(s->avctx, "%d %d %td %td\n", pic_arg->linesize[0], pic_arg->linesize[1], s->linesize, s->uvlinesize); |