aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-07 14:30:34 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-13 13:04:31 +0100
commit52bf144ad9e433f8d45dae8cc1797c67ba280c69 (patch)
tree4ccc05ffcc48e1590480994b460a188533fedff4
parent6fc8c72c7db02267cb03f2eb7022dca4cf22a2b6 (diff)
downloadffmpeg-52bf144ad9e433f8d45dae8cc1797c67ba280c69.tar.gz
avcodec/utils: Align YUV411 by as much as the other YUV variants
Fixes out of array accesses Fixes: ffmpeg_mjpeg_crash2.avi Found-by: Thomas Lindroth <thomas.lindroth@gmail.com> Tested-by: Thomas Lindroth <thomas.lindroth@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit e3201c38d53d2b8b24d0bc95d726b2cb1752dc12) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 581cd04dbb..5b284968b3 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -374,7 +374,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
case AV_PIX_FMT_YUVJ411P:
case AV_PIX_FMT_UYYVYY411:
w_align = 32;
- h_align = 8;
+ h_align = 16 * 2;
break;
case AV_PIX_FMT_YUV410P:
if (s->codec_id == AV_CODEC_ID_SVQ1) {