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