avcodec/utvideodec: fix decoding odd sizes with interlaced video with some formats

Fixes #6316.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2017-04-21 12:27:17 +02:00
parent 0b8c159a93
commit 9ef21a897c
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ static int decode_plane(UtvideoContext *c, int plane_no,
VLC vlc;
GetBitContext gb;
int prev, fsym;
const int cmask = ~(!plane_no && c->avctx->pix_fmt == AV_PIX_FMT_YUV420P);
const int cmask = c->interlaced ? ~(1 + 2 * (!plane_no && c->avctx->pix_fmt == AV_PIX_FMT_YUV420P)) : ~(!plane_no && c->avctx->pix_fmt == AV_PIX_FMT_YUV420P);
if (build_huff(src, &vlc, &fsym)) {
av_log(c->avctx, AV_LOG_ERROR, "Cannot build Huffman codes\n");