From 012b319d9147c18e6148003052b147722d11fe6e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 20 Apr 2013 02:15:13 +0200 Subject: [PATCH] vc1dec: Fix tff == 0 handling in init_block_index() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes several files from VLC ticket 5887. Signed-off-by: Martin Storsjö --- libavcodec/vc1dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 1238da2859..b07214ad6f 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -77,7 +77,7 @@ static void init_block_index(VC1Context *v) { MpegEncContext *s = &v->s; ff_init_block_index(s); - if (v->field_mode && v->second_field) { + if (v->field_mode && !(v->second_field ^ v->tff)) { s->dest[0] += s->current_picture_ptr->f.linesize[0]; s->dest[1] += s->current_picture_ptr->f.linesize[1]; s->dest[2] += s->current_picture_ptr->f.linesize[2];