summaryrefslogtreecommitdiff
path: root/libavcodec/vc1dec.c
diff options
context:
space:
mode:
authorJerome Borsboom <jerome.borsboom@carpalis.nl>2018-05-18 17:06:32 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-05-20 13:17:36 +0200
commit2b86472a65b7fe48f8467b669462b7972cc2f1ae (patch)
treea82e8f11cd29e5e6fd2a958eb38a258233bd307b /libavcodec/vc1dec.c
parentca878845ae037c0aaf3b3ede0e9c838a223ecc97 (diff)
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: Jerome Borsboom <jerome.borsboom@carpalis.nl> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/vc1dec.c')
-rw-r--r--libavcodec/vc1dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 40a3e501dd..4f7b20a4a4 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -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);