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 <unistd.h> includes for _exit(), and <string.h> for memcpy().
This commit is contained in:
Kevin Easton
2015-03-17 00:06:34 +11:00
parent 6898260809
commit 1c6ff3088a
5 changed files with 10 additions and 5 deletions

View File

@@ -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<<slen[1])-1;
sfb++;
}

View File

@@ -12,6 +12,8 @@
#define HUFFMAN
#include "huffman.h"
#include <unistd.h>
static inline unsigned int viewbits(int n)
{
unsigned int pos,ret_value;

View File

@@ -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;

View File

@@ -11,6 +11,8 @@
#define POSITION
#include "position.h"
#include <string.h>
/* Returns the number of frames actually skipped, -1 on error.
*
* Values in header are not changed if retval!=nframes.

View File

@@ -10,6 +10,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <unistd.h>
#include "audio.h"