summaryrefslogtreecommitdiff
path: root/libavcodec/vc1.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-14 14:52:31 +0100
committerMartin Storsjö <martin@martin.st>2013-12-17 22:01:45 +0200
commitd8fd183683b7495566b7e510a6536ae2efe8dfed (patch)
treeb656395ee31db8b67ae652bff213a9d05357a5a8 /libavcodec/vc1.c
parentbd316109b33362dbaf2629c16e05bf65adbf8573 (diff)
vc1: Fix mb_height for field pictures
Tables are always allocated now with sufficient space for either progressive or interlaced content. The alternative would be to detect a change and reallocate. This fixes decoding of a sample. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/vc1.c')
-rw-r--r--libavcodec/vc1.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index a78d23e95a..6d89e713a0 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -864,11 +864,13 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
v->fcm = fcm;
if (v->field_mode) {
+ v->s.mb_height = FFALIGN(v->s.height + 15 >> 4, 2);
v->fptype = get_bits(gb, 3);
v->s.pict_type = (v->fptype & 2) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
if (v->fptype & 4) // B-picture
v->s.pict_type = (v->fptype & 2) ? AV_PICTURE_TYPE_BI : AV_PICTURE_TYPE_B;
} else {
+ v->s.mb_height = v->s.height + 15 >> 4;
switch (get_unary(gb, 0, 4)) {
case 0:
v->s.pict_type = AV_PICTURE_TYPE_P;