Branch Coverage

src/aac.c
Criterion Covered Total %
branch 56 104 53.8


line true false branch
35 0 5 if ( !_check_buf(infile, &buf, 10, AAC_BLOCK_SIZE) ) {
43 2 3 if (
44 1 1 (bptr[0] == 'I' && bptr[1] == 'D' && bptr[2] == '3') &&
1 0 (bptr[0] == 'I' && bptr[1] == 'D' && bptr[2] == '3') &&
1 0 (bptr[0] == 'I' && bptr[1] == 'D' && bptr[2] == '3') &&
45 1 0 bptr[3] < 0xff && bptr[4] < 0xff &&
1 0 bptr[3] < 0xff && bptr[4] < 0xff &&
46 1 0 bptr[6] < 0x80 && bptr[7] < 0x80 && bptr[8] < 0x80 && bptr[9] < 0x80
1 0 bptr[6] < 0x80 && bptr[7] < 0x80 && bptr[8] < 0x80 && bptr[9] < 0x80
1 0 bptr[6] < 0x80 && bptr[7] < 0x80 && bptr[8] < 0x80 && bptr[9] < 0x80
51 0 1 if (bptr[5] & 0x10) {
65 0 1 if ( !_check_buf(infile, &buf, 10, AAC_BLOCK_SIZE) ) {
72 669 0 while ( buffer_len(&buf) >= 6 ) {
75 5 664 if ( (bptr[0] == 0xFF) && ((bptr[1] & 0xF6) == 0xF0)
5 0 if ( (bptr[0] == 0xFF) && ((bptr[1] & 0xF6) == 0xF0)
76 0 5 && aac_parse_adts(infile, file, file_size - audio_offset, &buf, info))
97 1 4 if (id3_size) {
104 0 5 if (err) return err;
126 0 104 if ( !_check_buf(infile, buf, audio_size > AAC_BLOCK_SIZE ? AAC_BLOCK_SIZE : audio_size, AAC_BLOCK_SIZE) ) {
127 0 0 if (frames < 1)
136 104 0 if (!((bptr[0] == 0xFF)&&((bptr[1] & 0xF6) == 0xF0)))
104 0 if (!((bptr[0] == 0xFF)&&((bptr[1] & 0xF6) == 0xF0)))
139 5 99 if (frames == 0) {
148 5 99 if (frames == 0 && _check_buf(infile, buf, frame_length + 10, AAC_BLOCK_SIZE)) {
5 0 if (frames == 0 && _check_buf(infile, buf, frame_length + 10, AAC_BLOCK_SIZE)) {
151 5 0 if (!((bptr2[0] == 0xFF)&&((bptr2[1] & 0xF6) == 0xF0))
5 0 if (!((bptr2[0] == 0xFF)&&((bptr2[1] & 0xF6) == 0xF0))
152 5 0 || profile != (bptr2[2] & 0xc0) >> 6
153 5 0 || samplerate != adts_sample_rates[(bptr2[2]&0x3c)>>2]
154 0 5 || channels != (((bptr2[2] & 0x1) << 2) | ((bptr2[3] & 0xc0) >> 6)))
163 4 1 if (_check_buf(infile, buf, frame_length + frame_length2 + 10, AAC_BLOCK_SIZE)) {
165 4 0 if (!((bptr2[0] == 0xFF)&&((bptr2[1] & 0xF6) == 0xF0))
4 0 if (!((bptr2[0] == 0xFF)&&((bptr2[1] & 0xF6) == 0xF0))
166 4 0 || profile != (bptr2[2] & 0xc0) >> 6
167 4 0 || samplerate != adts_sample_rates[(bptr2[2]&0x3c)>>2]
168 0 4 || channels != (((bptr2[2] & 0x1) << 2) | ((bptr2[3] & 0xc0) >> 6)))
178 0 104 if (frame_length > buffer_len(buf))
185 5 99 if (audio_size < 6)
189 0 5 if (frames < 1) {
195 5 0 if (frames != 0)
202 5 0 if (frames_per_sec != 0)
209 5 0 if (samplerate >= 8000) {
210 5 0 if (profile == 1) { // LC
211 5 0 if (channels <= 2) {
212 5 0 if (bitrate <= 192) {
213 2 3 if (samplerate <= 24000)
218 0 0 else if (bitrate <= 320) {
219 0 0 if (samplerate <= 24000)
225 0 0 if (samplerate <= 24000)
231 0 0 else if (channels <= 6) {
232 0 0 if (samplerate <= 24000)
241 2 3 if (samplerate <= 24000)