提交 1a48a570 编写于 作者: J Jason Garrett-Glaser

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
上级 313b52fb
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册