diff --git a/src/common/truehd.cpp b/src/common/truehd.cpp index 0276d4bc8..fb4a278ac 100644 --- a/src/common/truehd.cpp +++ b/src/common/truehd.cpp @@ -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); diff --git a/src/common/truehd.h b/src/common/truehd.h index 42faf1dad..a90b4e03d 100644 --- a/src/common/truehd.h +++ b/src/common/truehd.h @@ -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;