mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +00:00
Actually check the output of parse_aac_data so that invalid codec data will not go unpunished.
This commit is contained in:
parent
9e6a80158e
commit
9340c97515
@ -1475,9 +1475,12 @@ qtmp4_reader_c::create_packetizer(int64_t tid) {
|
||||
bool sbraac;
|
||||
|
||||
if (dmx->esds.decoder_config_len >= 2) {
|
||||
parse_aac_data(dmx->esds.decoder_config,
|
||||
if (!parse_aac_data(dmx->esds.decoder_config,
|
||||
dmx->esds.decoder_config_len, profile, channels,
|
||||
sample_rate, output_sample_rate, sbraac);
|
||||
sample_rate, output_sample_rate, sbraac))
|
||||
mxerror(FMT_TID "This AAC track does not contain valid headers. "
|
||||
"Could not parse the AAC information.\n", ti.fname.c_str(),
|
||||
(int64_t)dmx->id);
|
||||
mxverb(2, PFX "AAC: profile: %d, sample_rate: %d, channels: "
|
||||
"%d, output_sample_rate: %d, sbr: %d\n", profile, sample_rate,
|
||||
channels, output_sample_rate, (int)sbraac);
|
||||
|
@ -361,9 +361,12 @@ real_reader_c::create_packetizer(int64_t tid) {
|
||||
mxverb(2, PFX "extra_len: %u\n", extra_len);
|
||||
if (dmx->extra_data_size >= (4 + extra_len)) {
|
||||
extra_data_parsed = true;
|
||||
parse_aac_data(&dmx->extra_data[4 + 1], extra_len - 1,
|
||||
profile, channels, sample_rate, output_sample_rate,
|
||||
sbr);
|
||||
if (!parse_aac_data(&dmx->extra_data[4 + 1], extra_len - 1,
|
||||
profile, channels, sample_rate,
|
||||
output_sample_rate, sbr))
|
||||
mxerror(FMT_TID "This AAC track does not contain valid headers. "
|
||||
"Could not parse the AAC information.\n",
|
||||
ti.fname.c_str(), (int64_t)track->id);
|
||||
mxverb(2, PFX "1. profile: %d, channels: %d, "
|
||||
"sample_rate: %d, output_sample_rate: %d, sbr: %d\n",
|
||||
profile, channels, sample_rate, output_sample_rate,
|
||||
|
Loading…
Reference in New Issue
Block a user