Mercurial > libavcodec.hg
comparison vp3.c @ 9922:ffdd1d32c40c libavcodec
Ensure that the filter limit values do not exceed the maximum allowed value of 127.
author | reimar |
---|---|
date | Sun, 05 Jul 2009 18:27:39 +0000 |
parents | f42402d1778b |
children | ba58c3abf832 |
comparison
equal
deleted
inserted
replaced
9921:f42402d1778b | 9922:ffdd1d32c40c |
---|---|
2169 int i, n, matrices, inter, plane; | 2169 int i, n, matrices, inter, plane; |
2170 | 2170 |
2171 if (s->theora >= 0x030200) { | 2171 if (s->theora >= 0x030200) { |
2172 n = get_bits(gb, 3); | 2172 n = get_bits(gb, 3); |
2173 /* loop filter limit values table */ | 2173 /* loop filter limit values table */ |
2174 for (i = 0; i < 64; i++) | 2174 for (i = 0; i < 64; i++) { |
2175 s->filter_limit_values[i] = get_bits(gb, n); | 2175 s->filter_limit_values[i] = get_bits(gb, n); |
2176 if (s->filter_limit_values[i] > 127) { | |
2177 av_log(avctx, AV_LOG_ERROR, "filter limit value too large (%i > 127), clamping\n", s->filter_limit_values[i]); | |
2178 s->filter_limit_values[i] = 127; | |
2179 } | |
2180 } | |
2176 } | 2181 } |
2177 | 2182 |
2178 if (s->theora >= 0x030200) | 2183 if (s->theora >= 0x030200) |
2179 n = get_bits(gb, 4) + 1; | 2184 n = get_bits(gb, 4) + 1; |
2180 else | 2185 else |