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
@ -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…
x
Reference in New Issue
Block a user