changeset 36796:e5fc26f7067a

aac_hdr: remove variable to fix warning, add const.
author reimar
date Wed, 19 Feb 2014 23:01:10 +0000
parents 7ee92e6f4d61
children 43837615479b
files libmpdemux/aac_hdr.c
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/aac_hdr.c	Wed Feb 19 23:01:09 2014 +0000
+++ b/libmpdemux/aac_hdr.c	Wed Feb 19 23:01:10 2014 +0000
@@ -27,13 +27,12 @@
 /// aac_parse_frames needs a buffer at least 8 bytes long
 int aac_parse_frame(uint8_t *buf, int *srate, int *num)
 {
-	int i = 0, sr, fl = 0, id;
-	static int srates[] = {96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 0, 0, 0};
+	int i = 0, sr, fl = 0;
+	static const int srates[] = {96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 0, 0, 0};
 
 	if((buf[i] != 0xFF) || ((buf[i+1] & 0xF6) != 0xF0))
 		return 0;
 
-	id = (buf[i+1] >> 3) & 0x01;	//id=1 mpeg2, 0: mpeg4
 	sr = (buf[i+2] >> 2)  & 0x0F;
 	if(sr > 11)
 		return 0;