mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Set language field when creating MediaFormat from a Format
Currently Transformer simply omits the language field from the input media file when writing data to the output file. PiperOrigin-RevId: 591287481
This commit is contained in:
parent
7579693739
commit
1303bfbc7c
1 changed files with 1 additions and 0 deletions
|
|
@ -123,6 +123,7 @@ import java.nio.ByteBuffer;
|
||||||
} else {
|
} else {
|
||||||
mediaFormat =
|
mediaFormat =
|
||||||
MediaFormat.createAudioFormat(sampleMimeType, format.sampleRate, format.channelCount);
|
MediaFormat.createAudioFormat(sampleMimeType, format.sampleRate, format.channelCount);
|
||||||
|
MediaFormatUtil.maybeSetString(mediaFormat, MediaFormat.KEY_LANGUAGE, format.language);
|
||||||
}
|
}
|
||||||
MediaFormatUtil.setCsdBuffers(mediaFormat, format.initializationData);
|
MediaFormatUtil.setCsdBuffers(mediaFormat, format.initializationData);
|
||||||
int trackIndex;
|
int trackIndex;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue