summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/codecs/libtremor/backends.h6
-rw-r--r--apps/codecs/libtremor/mapping0.c6
2 files changed, 7 insertions, 5 deletions
diff --git a/apps/codecs/libtremor/backends.h b/apps/codecs/libtremor/backends.h
index 9b63080a6b..e27f1f2b80 100644
--- a/apps/codecs/libtremor/backends.h
+++ b/apps/codecs/libtremor/backends.h
@@ -110,7 +110,7 @@ typedef struct{
110 110
111typedef struct vorbis_info_mapping0{ 111typedef struct vorbis_info_mapping0{
112 int submaps; /* <= 16 */ 112 int submaps; /* <= 16 */
113 int chmuxlist[256]; /* up to 256 channels in a Vorbis stream */ 113 int chmuxlist[CHANNELS]; /* up to 256 channels in a Vorbis stream */
114 114
115 int floorsubmap[16]; /* [mux] submap to floors */ 115 int floorsubmap[16]; /* [mux] submap to floors */
116 int residuesubmap[16]; /* [mux] submap to residue */ 116 int residuesubmap[16]; /* [mux] submap to residue */
@@ -121,8 +121,8 @@ typedef struct vorbis_info_mapping0{
121#endif 121#endif
122 122
123 int coupling_steps; 123 int coupling_steps;
124 int coupling_mag[256]; 124 unsigned char coupling_mag[256];
125 int coupling_ang[256]; 125 unsigned char coupling_ang[256];
126} vorbis_info_mapping0; 126} vorbis_info_mapping0;
127 127
128#endif 128#endif
diff --git a/apps/codecs/libtremor/mapping0.c b/apps/codecs/libtremor/mapping0.c
index 9284775718..9042b9c174 100644
--- a/apps/codecs/libtremor/mapping0.c
+++ b/apps/codecs/libtremor/mapping0.c
@@ -147,8 +147,10 @@ static vorbis_info_mapping *mapping0_unpack(vorbis_info *vi,oggpack_buffer *opb)
147 info->coupling_steps=oggpack_read(opb,8)+1; 147 info->coupling_steps=oggpack_read(opb,8)+1;
148 if(info->coupling_steps<=0)goto err_out; 148 if(info->coupling_steps<=0)goto err_out;
149 for(i=0;i<info->coupling_steps;i++){ 149 for(i=0;i<info->coupling_steps;i++){
150 int testM=info->coupling_mag[i]=oggpack_read(opb,ilog(vi->channels)); 150 int testM=oggpack_read(opb,ilog(vi->channels));
151 int testA=info->coupling_ang[i]=oggpack_read(opb,ilog(vi->channels)); 151 info->coupling_mag[i]=testM;
152 int testA=oggpack_read(opb,ilog(vi->channels));
153 info->coupling_ang[i]=testA;
152 154
153 if(testM<0 || 155 if(testM<0 ||
154 testA<0 || 156 testA<0 ||