Happy shrimp
Http://blog.csdn.net/lights_joy/
Reprinted, but keep the author information
After adts_fixed_header (), this section is defined in the standard:
In FFMPEG, this section is processed with adts_fixed_header.CodeFFmpeg directly discards the three definitions copyright_identification_bit, copyright_identification_start, and adts_buffer_fullness.
This section consumes 28bit:
0 10 1f FC
The two headers consume a total of 56 bits and 7 bytes.
The obtained variable values are:
Here, frame_length specifies the data encoding length of this frame. The value of adts_buffer_fullness is 2047, that is, 0x7ff in hexadecimal notation. According to the standard:
A value of hexadecimal 7ff signals that the bitstream is a variable rate bitstream. In this case, buffer fullness is not applicable.
In FFMPEG, calculate the number of samples using the value of number_of_raw_data_blocks_in_frame:
HDR-> frame_length = size = get_bits (GBC, 13);/* aac_frame_length */
HDR-> number_of_raw_data_blocks_in_frame = RDB = get_bits (GBC, 2 );
HDR-> num_aac_frames = RDB + 1;
HDR-> samples = (RDB + 1) * 1024;
HDR-> bit_rate = size * 8 * HDR-> sample_rate/HDR-> samples;