summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-04-08 20:48:44 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-04-08 20:48:44 +0000
commit0127b86108c3e2c7b63c7996b10c62877030b706 (patch)
treeee68e4e73cf9b959aa93e35a14fe4dc20c537839 /libavcodec/mpegvideo.c
parente90f5b5ab1fdb2a9cef3fb9a13bab8e38f361a88 (diff)
Fix mb_height for interlaced mpeg2.
This correctly fixes issue961, thanks to steven warren for spotting my mistake. Originally committed as revision 18381 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index bf1831f1f3..e1bec68f12 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -444,6 +444,9 @@ av_cold int MPV_common_init(MpegEncContext *s)
{
int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y, threads;
+ if(s->codec_id == CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
+ s->mb_height = (s->height + 31) / 32 * 2;
+ else
s->mb_height = (s->height + 15) / 16;
if(s->avctx->pix_fmt == PIX_FMT_NONE){