summaryrefslogtreecommitdiff
path: root/libavcodec/vorbis.c
diff options
context:
space:
mode:
authorDenes Balatoni <dbalatoni@programozo.hu>2006-05-07 17:30:00 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-05-07 17:30:00 +0000
commit8d39d67a789f1695d4db6cd4845ec4920336437e (patch)
tree40734755d5d8a3ac2ab82440642f2f58baa04d8b /libavcodec/vorbis.c
parent1dd509b1576e9fcac45ea63a664abf29ee419ded (diff)
downloadffmpeg-8d39d67a789f1695d4db6cd4845ec4920336437e.tar.gz
vorbis 5:1 decoding fix, fix mi2_vorbis51.mp4, patch by Denes Balatoni <dbalatoni at programozo dot hu>
Originally committed as revision 5349 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vorbis.c')
-rw-r--r--libavcodec/vorbis.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/vorbis.c b/libavcodec/vorbis.c
index 2e9528eb92..0deda82b97 100644
--- a/libavcodec/vorbis.c
+++ b/libavcodec/vorbis.c
@@ -1357,7 +1357,9 @@ static int vorbis_residue_decode(vorbis_context *vc, vorbis_residue *vr, uint_fa
uint_fast32_t temp2;
temp2=(((uint_fast64_t)temp) * inverse[vr->classifications])>>32;
- classifs[j_times_ptns_to_read+partition_count+c_p_c-1-i]=temp-temp2*vr->classifications;
+ if (partition_count+c_p_c-1-i < ptns_to_read) {
+ classifs[j_times_ptns_to_read+partition_count+c_p_c-1-i]=temp-temp2*vr->classifications;
+ }
temp=temp2;
}
}