diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 5f871bce92..18c6f24125 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -482,6 +482,9 @@ static int unpack_superblocks(Vp3DecodeContext *s, GetBitContext *gb) if (bit) num_partial_superblocks += current_run; + if (s->theora && current_run == MAXIMUM_LONG_BIT_RUN) + bit = get_bits1(gb); + else bit ^= 1; } @@ -512,6 +515,9 @@ static int unpack_superblocks(Vp3DecodeContext *s, GetBitContext *gb) } superblocks_decoded += current_run; + if (s->theora && current_run == MAXIMUM_LONG_BIT_RUN) + bit = get_bits1(gb); + else bit ^= 1; } }