---
 libavcodec/vorbisdec.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index 801d951..39c88e6 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -1321,11 +1321,11 @@ static av_always_inline int 
setup_classifs(vorbis_context *vc,
 
             assert(vr->classifications > 1 && temp <= 65536); //needed for 
inverse[]
 
-            for (i = 0; i < c_p_c; ++i) {
+            for (i = partition_count + c_p_c - 1; i >= partition_count; i--) {
                 temp2 = (((uint64_t)temp) * inverse_class) >> 32;
-                if (partition_count + c_p_c - 1 - i < vr->ptns_to_read)
-                    vr->classifs[p + partition_count + c_p_c - 1 - i] =
-                        temp - temp2 * vr->classifications;
+
+                if (i < vr->ptns_to_read)
+                    vr->classifs[p + i] = temp - temp2 * vr->classifications;
                 temp = temp2;
             }
         }
-- 
1.8.2.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to