aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vp9block.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2014-11-11 13:27:01 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-11-21 12:37:05 +0000
commit312daa15891dc7abb77a404fe927d5ee35c52a71 (patch)
treee278152367cd18bf38ab8afc7d8496dcba66d5d9 /libavcodec/vp9block.c
parentd466d82faaf6e0e57a3a4be5e38e3902ef251ac3 (diff)
downloadffmpeg-312daa15891dc7abb77a404fe927d5ee35c52a71.tar.gz
vp9: Use the correct upper bound for seg_id
And use a macro to make apparent why the value. Bug-Id: CID 1108595
Diffstat (limited to 'libavcodec/vp9block.c')
-rw-r--r--libavcodec/vp9block.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vp9block.c b/libavcodec/vp9block.c
index caf3bcc2ae..a92c794ebf 100644
--- a/libavcodec/vp9block.c
+++ b/libavcodec/vp9block.c
@@ -71,7 +71,8 @@ static void decode_mode(VP9Context *s, VP9Block *const b)
vp56_rac_get_prob_branchy(&s->c,
s->prob.segpred[s->above_segpred_ctx[col] +
s->left_segpred_ctx[row7]]))) {
- int pred = 8, x;
+ int pred = MAX_SEGMENT - 1;
+ int x;
for (y = 0; y < h4; y++)
for (x = 0; x < w4; x++)