Fix MOV with pcm_alaw/pcm_mulaw which is fixedSampleSize
This commit is contained in:
parent
a3a5760757
commit
af4028f30e
@ -386,7 +386,9 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
||||
// Fixed sample size raw audio may need to be rechunked.
|
||||
boolean isFixedSampleSizeRawAudio =
|
||||
sampleSizeBox.isFixedSampleSize()
|
||||
&& MimeTypes.AUDIO_RAW.equals(track.format.sampleMimeType)
|
||||
&& (MimeTypes.AUDIO_RAW.equals(track.format.sampleMimeType)
|
||||
|| MimeTypes.AUDIO_MLAW.equals(track.format.sampleMimeType)
|
||||
|| MimeTypes.AUDIO_ALAW.equals(track.format.sampleMimeType))
|
||||
&& remainingTimestampDeltaChanges == 0
|
||||
&& remainingTimestampOffsetChanges == 0
|
||||
&& remainingSynchronizationSamples == 0;
|
||||
@ -406,8 +408,14 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
||||
chunkOffsetsBytes[chunkIterator.index] = chunkIterator.offset;
|
||||
chunkSampleCounts[chunkIterator.index] = chunkIterator.numSamples;
|
||||
}
|
||||
int fixedSampleSize =
|
||||
Util.getPcmFrameSize(track.format.pcmEncoding, track.format.channelCount);
|
||||
int fixedSampleSize;
|
||||
if (MimeTypes.AUDIO_MLAW.equals(track.format.sampleMimeType)
|
||||
|| MimeTypes.AUDIO_ALAW.equals(track.format.sampleMimeType)) {
|
||||
fixedSampleSize = sampleSizeBox.isFixedSampleSize() ? sampleSizeBox.readNextSampleSize() : 1;
|
||||
} else {
|
||||
fixedSampleSize =
|
||||
Util.getPcmFrameSize(track.format.pcmEncoding, track.format.channelCount);
|
||||
}
|
||||
FixedSampleSizeRechunker.Results rechunkedResults =
|
||||
FixedSampleSizeRechunker.rechunk(
|
||||
fixedSampleSize, chunkOffsetsBytes, chunkSampleCounts, timestampDeltaInTimeUnits);
|
||||
|
Loading…
x
Reference in New Issue
Block a user