mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-29 06:15:24 +00:00
TrueHD: parse input timing
This commit is contained in:
parent
6749045212
commit
a18fe530f2
@ -113,7 +113,13 @@ frame_t::parse_truehd_header(unsigned char const *data,
|
||||
static debugging_option_c s_debug{"truehd_atmos"};
|
||||
|
||||
try {
|
||||
mtx::bits::reader_c r{&data[8], size - 8};
|
||||
mtx::bits::reader_c r{data, size};
|
||||
|
||||
r.skip_bits(4 + 12); // check_nibble, access_unit_length
|
||||
|
||||
m_input_timing = r.get_bits(16);
|
||||
|
||||
r.skip_bits(32); // format_sync
|
||||
|
||||
auto rate_bits = r.get_bits(4);
|
||||
m_samples_per_frame = 40 << (rate_bits & 0x07);
|
||||
|
@ -45,7 +45,7 @@ struct frame_t {
|
||||
codec_e m_codec{truehd};
|
||||
frame_type_e m_type{invalid};
|
||||
int m_size{}, m_sampling_rate{}, m_channels{}, m_samples_per_frame{};
|
||||
unsigned int m_header_size{};
|
||||
unsigned int m_header_size{}, m_input_timing{};
|
||||
bool m_contains_atmos{};
|
||||
|
||||
mtx::ac3::frame_c m_ac3_header;
|
||||
|
Loading…
Reference in New Issue
Block a user