Commit 2b86472a authored by Jerome Borsboom's avatar Jerome Borsboom Committed by Michael Niedermayer

avcodec/vc1: fix calculation of the last line of a slice

Only for the last slice of the first field is the last line of the slice
equal to the height of the field.
Signed-off-by: 's avatarJerome Borsboom <jerome.borsboom@carpalis.nl>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent ca878845
......@@ -1029,7 +1029,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
av_log(v->s.avctx, AV_LOG_ERROR, "first field slice count too large\n");
continue;
}
s->end_mb_y = (i <= n_slices1 + 1) ? mb_height : FFMIN(mb_height, slices[i].mby_start % mb_height);
s->end_mb_y = (i == n_slices1 + 1) ? mb_height : FFMIN(mb_height, slices[i].mby_start % mb_height);
}
if (s->end_mb_y <= s->start_mb_y) {
av_log(v->s.avctx, AV_LOG_ERROR, "end mb y %d %d invalid\n", s->end_mb_y, s->start_mb_y);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment