From 1c6ff3088ad01a15bea50f78f1b2b468db7afae9 Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Tue, 17 Mar 2015 00:06:34 +1100 Subject: [PATCH] Fix compilation problems in 'amp' plugin. Four instances where 'default:' is at the end of a block replaced with 'default: break;' (reported by mscherer). One typo where [j] should have been [1] (array out of bounds error). Missing includes for _exit(), and for memcpy(). --- dll/amp/getdata.c | 2 +- dll/amp/huffman.c | 2 ++ dll/amp/layer2.c | 8 ++++---- dll/amp/position.c | 2 ++ dll/amp/util.c | 1 + 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dll/amp/getdata.c b/dll/amp/getdata.c index e4a0aa6..dc492ef 100644 --- a/dll/amp/getdata.c +++ b/dll/amp/getdata.c @@ -261,7 +261,7 @@ int j,k; for (k=0;k<6;k++) { scalefac_l[0][ch][sfb]=getbits(slen[1]); - i+=slen[j]; + i+=slen[1]; if (ch) is_max[sfb]=(1< + static inline unsigned int viewbits(int n) { unsigned int pos,ret_value; diff --git a/dll/amp/layer2.c b/dll/amp/layer2.c index d4c4d95..2b7d412 100644 --- a/dll/amp/layer2.c +++ b/dll/amp/layer2.c @@ -77,7 +77,7 @@ int hsize,fs,mean_frame_size; nbal=&t_nbal2; sblimit=8; break; - default : /*printf(" bit alloc info no gud ");*/ + default : break; } break; case 1 : switch (bitrate) /* 1 = 48 kHz */ @@ -98,7 +98,7 @@ int hsize,fs,mean_frame_size; nbal=&t_nbal2; sblimit=8; break; - default : /*printf(" bit alloc info no gud ");*/ + default : break; } break; case 2 : switch (bitrate) /* 2 = 32 kHz */ @@ -122,10 +122,10 @@ int hsize,fs,mean_frame_size; nbal=&t_nbal3; sblimit=12; break; - default : /*printf("bit alloc info not ok\n");*/ + default : break; } break; - default : /*printf("sampling freq. not ok/n");*/ + default : break; } else { bit_alloc_index=&t_allocMPG2; nbal=&t_nbalMPG2; diff --git a/dll/amp/position.c b/dll/amp/position.c index 005f430..789be2b 100644 --- a/dll/amp/position.c +++ b/dll/amp/position.c @@ -11,6 +11,8 @@ #define POSITION #include "position.h" +#include + /* Returns the number of frames actually skipped, -1 on error. * * Values in header are not changed if retval!=nframes. diff --git a/dll/amp/util.c b/dll/amp/util.c index 5b8bb6a..863f0ac 100644 --- a/dll/amp/util.c +++ b/dll/amp/util.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "audio.h"