This commit is contained in:
Michaël Banaan Ananas 2014-03-11 02:21:02 +00:00
parent 485142eb87
commit e6dcbb90e4
2 changed files with 3 additions and 6 deletions

View File

@ -96,8 +96,7 @@ bool mpeg_audio::decode_buffer(int &pos, int limit, short *output,
abort(); abort();
case 4: case 4:
try { try {
if (!read_header_amm(variant == 2)) read_header_amm(variant == 2);
return false;
read_data_mpeg2(); read_data_mpeg2();
if(last_frame_number) if(last_frame_number)
decode_mpeg2(output, output_samples); decode_mpeg2(output, output_samples);
@ -116,7 +115,7 @@ bool mpeg_audio::decode_buffer(int &pos, int limit, short *output,
return true; return true;
} }
bool mpeg_audio::read_header_amm(bool layer25) void mpeg_audio::read_header_amm(bool layer25)
{ {
gb(1); // unused gb(1); // unused
int full_packets_count = gb(4); // max 12 int full_packets_count = gb(4); // max 12
@ -137,8 +136,6 @@ bool mpeg_audio::read_header_amm(bool layer25)
joint_bands = joint_band_counts[stereo_mode_ext]; joint_bands = joint_band_counts[stereo_mode_ext];
if(joint_bands > total_bands ) if(joint_bands > total_bands )
joint_bands = total_bands; joint_bands = total_bands;
return true;
} }
void mpeg_audio::read_header_mpeg2(bool layer25) void mpeg_audio::read_header_mpeg2(bool layer25)

View File

@ -96,7 +96,7 @@ private:
int current_pos, current_limit; int current_pos, current_limit;
bool read_header_amm(bool layer25); void read_header_amm(bool layer25);
void read_header_mpeg2(bool layer25); void read_header_mpeg2(bool layer25);
void read_data_mpeg2(); void read_data_mpeg2();
void decode_mpeg2(short *output, int &output_samples); void decode_mpeg2(short *output, int &output_samples);