mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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 android.text.TextUtils;
|
||||||
import com.google.android.exoplayer2.C;
|
import com.google.android.exoplayer2.C;
|
||||||
import com.google.android.exoplayer2.Format;
|
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.DefaultExtractorInput;
|
||||||
import com.google.android.exoplayer2.extractor.Extractor;
|
import com.google.android.exoplayer2.extractor.Extractor;
|
||||||
import com.google.android.exoplayer2.extractor.ExtractorInput;
|
import com.google.android.exoplayer2.extractor.ExtractorInput;
|
||||||
|
|
@ -250,10 +249,8 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||||
if (extractor == null) {
|
if (extractor == null) {
|
||||||
// Media segment format is packed audio.
|
// Media segment format is packed audio.
|
||||||
long id3Timestamp = peekId3PrivTimestamp(input);
|
long id3Timestamp = peekId3PrivTimestamp(input);
|
||||||
if (id3Timestamp == C.TIME_UNSET) {
|
extractor = buildPackedAudioExtractor(id3Timestamp != C.TIME_UNSET
|
||||||
throw new ParserException("ID3 PRIV timestamp missing.");
|
? timestampAdjuster.adjustTsTimestamp(id3Timestamp) : startTimeUs);
|
||||||
}
|
|
||||||
extractor = buildPackedAudioExtractor(timestampAdjuster.adjustTsTimestamp(id3Timestamp));
|
|
||||||
}
|
}
|
||||||
if (skipLoadedBytes) {
|
if (skipLoadedBytes) {
|
||||||
input.skipFully(bytesLoaded);
|
input.skipFully(bytesLoaded);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue