mirror of
https://github.com/samsonjs/media.git
synced 2026-03-28 09:55:48 +00:00
Allow packed audio without PRIV timestamps
We use the segments' start time when the timestmap is not present. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=149006252
This commit is contained in:
parent
e40bba2852
commit
8e9711e8aa
1 changed files with 2 additions and 5 deletions
|
|
@ -18,7 +18,6 @@ package com.google.android.exoplayer2.source.hls;
|
|||
import android.text.TextUtils;
|
||||
import com.google.android.exoplayer2.C;
|
||||
import com.google.android.exoplayer2.Format;
|
||||
import com.google.android.exoplayer2.ParserException;
|
||||
import com.google.android.exoplayer2.extractor.DefaultExtractorInput;
|
||||
import com.google.android.exoplayer2.extractor.Extractor;
|
||||
import com.google.android.exoplayer2.extractor.ExtractorInput;
|
||||
|
|
@ -250,10 +249,8 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
if (extractor == null) {
|
||||
// Media segment format is packed audio.
|
||||
long id3Timestamp = peekId3PrivTimestamp(input);
|
||||
if (id3Timestamp == C.TIME_UNSET) {
|
||||
throw new ParserException("ID3 PRIV timestamp missing.");
|
||||
}
|
||||
extractor = buildPackedAudioExtractor(timestampAdjuster.adjustTsTimestamp(id3Timestamp));
|
||||
extractor = buildPackedAudioExtractor(id3Timestamp != C.TIME_UNSET
|
||||
? timestampAdjuster.adjustTsTimestamp(id3Timestamp) : startTimeUs);
|
||||
}
|
||||
if (skipLoadedBytes) {
|
||||
input.skipFully(bytesLoaded);
|
||||
|
|
|
|||
Loading…
Reference in a new issue