Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
af4028f3
authored
Oct 19, 2020
by
xufuji456
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix MOV with pcm_alaw/pcm_mulaw which is fixedSampleSize
parent
a3a57607
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java
View file @
af4028f3
...
@@ -386,7 +386,9 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
...
@@ -386,7 +386,9 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
// Fixed sample size raw audio may need to be rechunked.
// Fixed sample size raw audio may need to be rechunked.
boolean
isFixedSampleSizeRawAudio
=
boolean
isFixedSampleSizeRawAudio
=
sampleSizeBox
.
isFixedSampleSize
()
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
&&
remainingTimestampDeltaChanges
==
0
&&
remainingTimestampOffsetChanges
==
0
&&
remainingTimestampOffsetChanges
==
0
&&
remainingSynchronizationSamples
==
0
;
&&
remainingSynchronizationSamples
==
0
;
...
@@ -406,8 +408,14 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
...
@@ -406,8 +408,14 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
chunkOffsetsBytes
[
chunkIterator
.
index
]
=
chunkIterator
.
offset
;
chunkOffsetsBytes
[
chunkIterator
.
index
]
=
chunkIterator
.
offset
;
chunkSampleCounts
[
chunkIterator
.
index
]
=
chunkIterator
.
numSamples
;
chunkSampleCounts
[
chunkIterator
.
index
]
=
chunkIterator
.
numSamples
;
}
}
int
fixedSampleSize
=
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
);
Util
.
getPcmFrameSize
(
track
.
format
.
pcmEncoding
,
track
.
format
.
channelCount
);
}
FixedSampleSizeRechunker
.
Results
rechunkedResults
=
FixedSampleSizeRechunker
.
Results
rechunkedResults
=
FixedSampleSizeRechunker
.
rechunk
(
FixedSampleSizeRechunker
.
rechunk
(
fixedSampleSize
,
chunkOffsetsBytes
,
chunkSampleCounts
,
timestampDeltaInTimeUnits
);
fixedSampleSize
,
chunkOffsetsBytes
,
chunkSampleCounts
,
timestampDeltaInTimeUnits
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment