Commit c5e11e89 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'db347280'

* commit 'db347280':
  vorbis: fallback to normal division instead of crashing

Conflicts:
	libavcodec/vorbisdec.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents ed113d7a db347280
......@@ -1330,14 +1330,24 @@ static av_always_inline int setup_classifs(vorbis_context *vc,
av_dlog(NULL, "Classword: %u\n", temp);
av_assert0(vr->classifications > 1 && temp <= 65536); //needed for inverse[]
av_assert0(vr->classifications > 1); //needed for inverse[]
for (i = partition_count + c_p_c - 1; i >= partition_count; i--) {
temp2 = (((uint64_t)temp) * inverse_class) >> 32;
if (temp <= 65536) {
for (i = partition_count + c_p_c - 1; i >= partition_count; i--) {
temp2 = (((uint64_t)temp) * inverse_class) >> 32;
if (i < vr->ptns_to_read)
vr->classifs[p + i] = temp - temp2 * vr->classifications;
temp = temp2;
if (i < vr->ptns_to_read)
vr->classifs[p + i] = temp - temp2 * vr->classifications;
temp = temp2;
}
} else {
for (i = partition_count + c_p_c - 1; i >= partition_count; i--) {
temp2 = temp / vr->classifications;
if (i < vr->ptns_to_read)
vr->classifs[p + i] = temp - temp2 * vr->classifications;
temp = temp2;
}
}
}
p += vr->ptns_to_read;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment