Skip to content

Commit

Permalink
Merge pull request #973 from DolbyLaboratories/dolby/mp4mux_edts_dura…
Browse files Browse the repository at this point in the history
…tion_fix

fix edit list duration typo for AC3, EC3 and AC4.
  • Loading branch information
barbibulle authored Aug 4, 2024
2 parents 324c571 + 57a992e commit 3b809bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/C++/Apps/Mp4Mux/Mp4Mux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ AddAc3Track(AP4_Movie& movie,
if (!movie.GetTimeScale()) {
duration = sample_count * 1536;
} else {
duration = AP4_ConvertTime(1000*sample_table->GetSampleCount(), sample_rate, movie.GetTimeScale());
duration = AP4_ConvertTime(1536*sample_table->GetSampleCount(), sample_rate, movie.GetTimeScale());
}
AP4_ElstEntry new_elst_entry = AP4_ElstEntry(duration, 0, 1);
new_elst->AddEntry(new_elst_entry);
Expand Down Expand Up @@ -814,7 +814,7 @@ AddEac3Track(AP4_Movie& movie,
if (!movie.GetTimeScale()) {
duration = sample_count * 1536;
} else {
duration = AP4_ConvertTime(1000*sample_table->GetSampleCount(), sample_rate, movie.GetTimeScale());
duration = AP4_ConvertTime(1536*sample_table->GetSampleCount(), sample_rate, movie.GetTimeScale());
}
AP4_ElstEntry new_elst_entry = AP4_ElstEntry(duration, 0, 1);
new_elst->AddEntry(new_elst_entry);
Expand Down Expand Up @@ -962,7 +962,7 @@ AddAc4Track(AP4_Movie& movie,
if (!movie.GetTimeScale()) {
duration = AP4_UI64(sample_count) * sample_duration;
} else {
duration = AP4_ConvertTime(1000*sample_table->GetSampleCount(), media_time_scale, movie.GetTimeScale());
duration = AP4_ConvertTime(AP4_UI64(sample_count)*sample_table->GetSampleCount(), media_time_scale, movie.GetTimeScale());
}
AP4_ElstEntry new_elst_entry = AP4_ElstEntry(duration, 0, 1);
new_elst->AddEntry(new_elst_entry);
Expand Down

0 comments on commit 3b809bd

Please sign in to comment.