Make sure mpeg2 has its height rounded up to 32 as that is needed

for interlaced stuff.
This might have been exploitable when emu edge was not set though
note this bug has been introduced just a few days ago.

Originally committed as revision 18405 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2009-04-10 00:09:07 +00:00
parent cfe675269b
commit c81185a183
1 changed files with 2 additions and 0 deletions

View File

@ -144,6 +144,8 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height){
case PIX_FMT_YUVA420P:
w_align= 16; //FIXME check for non mpeg style codecs and use less alignment
h_align= 16;
if(s->codec_id == CODEC_ID_MPEG2VIDEO)
h_align= 32; // interlaced is rounded up to 2 MBs
break;
case PIX_FMT_YUV411P:
case PIX_FMT_UYYVYY411: