mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
Do not write empty track (with no samples) in a non fragmented MP4
PiperOrigin-RevId: 600453680
(cherry picked from commit 94bf9fa81d)
This commit is contained in:
parent
6632531c4a
commit
50e0072dac
1 changed files with 3 additions and 0 deletions
|
|
@ -67,6 +67,9 @@ import org.checkerframework.checker.nullness.qual.PolyNull;
|
|||
long videoDurationUs = 0L;
|
||||
for (int i = 0; i < tracks.size(); i++) {
|
||||
TrackMetadataProvider track = tracks.get(i);
|
||||
if (!isFragmentedMp4 && track.writtenSamples().isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
Format format = track.format();
|
||||
String languageCode = bcp47LanguageTagToIso3(format.language);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue