[FFmpeg-cvslog] avcodec/utils: Align YUV411 by as much as the other YUV variants

Michael Niedermayer git at videolan.org
Thu Mar 12 00:52:55 CET 2015


ffmpeg | branch: release/0.7 | Michael Niedermayer <michaelni at gmx.at> | Sat Mar  7 14:30:34 2015 +0100| [bd92af66a1f0cfbb2bb6d372dbf1fac7caaa1732] | committer: Michael Niedermayer

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 at gmail.com>
Tested-by: Thomas Lindroth <thomas.lindroth at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit e3201c38d53d2b8b24d0bc95d726b2cb1752dc12)

Conflicts:

	libavcodec/utils.c

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bd92af66a1f0cfbb2bb6d372dbf1fac7caaa1732
---

 libavcodec/utils.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 27feb53..569047f 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -161,8 +161,8 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, int l
         break;
     case PIX_FMT_YUV411P:
     case PIX_FMT_UYYVYY411:
-        w_align=32;
-        h_align=8;
+        w_align = 32;
+        h_align = 16 * 2;
         break;
     case PIX_FMT_YUV410P:
         if(s->codec_id == CODEC_ID_SVQ1){



More information about the ffmpeg-cvslog mailing list