mirror of
https://github.com/androidx/media.git
synced 2025-05-10 09:12:16 +08:00
Do not write empty track (with no samples) in a non fragmented MP4
PiperOrigin-RevId: 600453680 (cherry picked from commit 94bf9fa81d836b25cb893cf09e71045b3bbeef8a)
This commit is contained in:
parent
6632531c4a
commit
50e0072dac
@ -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…
x
Reference in New Issue
Block a user