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:
@@ -261,7 +261,7 @@ int j,k;
|
|||||||
for (k=0;k<6;k++)
|
for (k=0;k<6;k++)
|
||||||
{
|
{
|
||||||
scalefac_l[0][ch][sfb]=getbits(slen[1]);
|
scalefac_l[0][ch][sfb]=getbits(slen[1]);
|
||||||
i+=slen[j];
|
i+=slen[1];
|
||||||
if (ch) is_max[sfb]=(1<<slen[1])-1;
|
if (ch) is_max[sfb]=(1<<slen[1])-1;
|
||||||
sfb++;
|
sfb++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
#define HUFFMAN
|
#define HUFFMAN
|
||||||
#include "huffman.h"
|
#include "huffman.h"
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
static inline unsigned int viewbits(int n)
|
static inline unsigned int viewbits(int n)
|
||||||
{
|
{
|
||||||
unsigned int pos,ret_value;
|
unsigned int pos,ret_value;
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ int hsize,fs,mean_frame_size;
|
|||||||
nbal=&t_nbal2;
|
nbal=&t_nbal2;
|
||||||
sblimit=8;
|
sblimit=8;
|
||||||
break;
|
break;
|
||||||
default : /*printf(" bit alloc info no gud ");*/
|
default : break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1 : switch (bitrate) /* 1 = 48 kHz */
|
case 1 : switch (bitrate) /* 1 = 48 kHz */
|
||||||
@@ -98,7 +98,7 @@ int hsize,fs,mean_frame_size;
|
|||||||
nbal=&t_nbal2;
|
nbal=&t_nbal2;
|
||||||
sblimit=8;
|
sblimit=8;
|
||||||
break;
|
break;
|
||||||
default : /*printf(" bit alloc info no gud ");*/
|
default : break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2 : switch (bitrate) /* 2 = 32 kHz */
|
case 2 : switch (bitrate) /* 2 = 32 kHz */
|
||||||
@@ -122,10 +122,10 @@ int hsize,fs,mean_frame_size;
|
|||||||
nbal=&t_nbal3;
|
nbal=&t_nbal3;
|
||||||
sblimit=12;
|
sblimit=12;
|
||||||
break;
|
break;
|
||||||
default : /*printf("bit alloc info not ok\n");*/
|
default : break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default : /*printf("sampling freq. not ok/n");*/
|
default : break;
|
||||||
} else {
|
} else {
|
||||||
bit_alloc_index=&t_allocMPG2;
|
bit_alloc_index=&t_allocMPG2;
|
||||||
nbal=&t_nbalMPG2;
|
nbal=&t_nbalMPG2;
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
#define POSITION
|
#define POSITION
|
||||||
#include "position.h"
|
#include "position.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
/* Returns the number of frames actually skipped, -1 on error.
|
/* Returns the number of frames actually skipped, -1 on error.
|
||||||
*
|
*
|
||||||
* Values in header are not changed if retval!=nframes.
|
* Values in header are not changed if retval!=nframes.
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user