summaryrefslogtreecommitdiff
path: root/libavcodec/vp3.c
diff options
context:
space:
mode:
authorJason Garrett-Glaser <darkshikari@gmail.com>2010-10-26 07:29:00 +0000
committerJason Garrett-Glaser <darkshikari@gmail.com>2010-10-26 07:29:00 +0000
commit1a48a57071df7756a92dee147acb2123cb92a799 (patch)
treea23f056efafca894fc3b85f0fbc0be6acc02d4e9 /libavcodec/vp3.c
parent313b52fbfff47ed934cdeccaebda9b3406466575 (diff)
downloadffmpeg-1a48a57071df7756a92dee147acb2123cb92a799.tar.gz
Fix Theora decoding bug if loopfilter is completely disabled
Bug caused by the fact that get_bits(gb, 0) is undefined. Doesn't affect any streams generated by the official Theora encoder, but such streams are nevertheless valid. Fixes decoding of CELT-933dd833-nmr-bandt.ogv. Originally committed as revision 25573 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r--libavcodec/vp3.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 59719e7e65..85e45eafe8 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -2052,6 +2052,7 @@ static int theora_decode_tables(AVCodecContext *avctx, GetBitContext *gb)
if (s->theora >= 0x030200) {
n = get_bits(gb, 3);
/* loop filter limit values table */
+ if (n) {
for (i = 0; i < 64; i++) {
s->filter_limit_values[i] = get_bits(gb, n);
if (s->filter_limit_values[i] > 127) {
@@ -2059,6 +2060,7 @@ static int theora_decode_tables(AVCodecContext *avctx, GetBitContext *gb)
s->filter_limit_values[i] = 127;
}
}
+ }
}
if (s->theora >= 0x030200)