Write same timestamp in edit data MP4 as in outer MP4
The exiting code ensured that the timestamp is same only when it is set by the app. PiperOrigin-RevId: 661283124
This commit is contained in:
parent
931b0e25f1
commit
94abb9515b
@ -297,7 +297,6 @@ public final class Mp4Muxer implements Muxer {
|
||||
@Nullable private FileOutputStream cacheFileOutputStream;
|
||||
@Nullable private MetadataCollector editableVideoMetadataCollector;
|
||||
@Nullable private Mp4Writer editableVideoMp4Writer;
|
||||
@Nullable private Mp4TimestampData timestampData;
|
||||
|
||||
private Mp4Muxer(
|
||||
FileOutputStream outputStream,
|
||||
@ -429,9 +428,6 @@ public final class Mp4Muxer implements Muxer {
|
||||
@Override
|
||||
public void addMetadataEntry(Metadata.Entry metadataEntry) {
|
||||
checkArgument(MuxerUtil.isMetadataSupported(metadataEntry), "Unsupported metadata");
|
||||
if (metadataEntry instanceof Mp4TimestampData) {
|
||||
timestampData = (Mp4TimestampData) metadataEntry;
|
||||
}
|
||||
metadataCollector.addMetadata(metadataEntry);
|
||||
}
|
||||
|
||||
@ -543,9 +539,7 @@ public final class Mp4Muxer implements Muxer {
|
||||
MdtaMetadataEntry.KEY_EDITABLE_TRACKS_MAP,
|
||||
data,
|
||||
MdtaMetadataEntry.TYPE_INDICATOR_RESERVED));
|
||||
if (timestampData != null) {
|
||||
editableVideoMetadataCollector.addMetadata(timestampData);
|
||||
}
|
||||
editableVideoMetadataCollector.addMetadata(metadataCollector.timestampData);
|
||||
checkNotNull(editableVideoMp4Writer).finishWritingSamplesAndFinalizeMoovBox();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user