mirror of
https://github.com/androidx/media.git
synced 2025-05-14 02:59:52 +08:00
Replace stbl consistency assertions with a warning.
Issue: #1850 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=134073096
This commit is contained in:
parent
654d914bb6
commit
8cf107408d
@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.google.android.exoplayer2.extractor.mp4;
|
||||
|
||||
import android.util.Log;
|
||||
import android.util.Pair;
|
||||
import com.google.android.exoplayer2.C;
|
||||
import com.google.android.exoplayer2.Format;
|
||||
@ -38,6 +39,8 @@ import java.util.List;
|
||||
*/
|
||||
/* package */ final class AtomParsers {
|
||||
|
||||
private static final String TAG = "AtomParsers";
|
||||
|
||||
private static final int TYPE_vide = Util.getIntegerCodeForString("vide");
|
||||
private static final int TYPE_soun = Util.getIntegerCodeForString("soun");
|
||||
private static final int TYPE_text = Util.getIntegerCodeForString("text");
|
||||
@ -248,11 +251,16 @@ import java.util.List;
|
||||
remainingTimestampOffsetChanges--;
|
||||
}
|
||||
|
||||
// Check all the expected samples have been seen.
|
||||
Assertions.checkArgument(remainingSynchronizationSamples == 0);
|
||||
Assertions.checkArgument(remainingSamplesAtTimestampDelta == 0);
|
||||
Assertions.checkArgument(remainingSamplesInChunk == 0);
|
||||
Assertions.checkArgument(remainingTimestampDeltaChanges == 0);
|
||||
// If the stbl's child boxes are not consistent the container is malformed, but the stream may
|
||||
// still be playable.
|
||||
if (remainingSynchronizationSamples != 0 || remainingSamplesAtTimestampDelta != 0
|
||||
|| remainingSamplesInChunk != 0 || remainingTimestampDeltaChanges != 0) {
|
||||
Log.w(TAG, "Inconsistent stbl box for track " + track.id
|
||||
+ ": remainingSynchronizationSamples " + remainingSynchronizationSamples
|
||||
+ ", remainingSamplesAtTimestampDelta " + remainingSamplesAtTimestampDelta
|
||||
+ ", remainingSamplesInChunk " + remainingSamplesInChunk
|
||||
+ ", remainingTimestampDeltaChanges " + remainingTimestampDeltaChanges);
|
||||
}
|
||||
} else {
|
||||
long[] chunkOffsetsBytes = new long[chunkIterator.length];
|
||||
int[] chunkSampleCounts = new int[chunkIterator.length];
|
||||
|
Loading…
x
Reference in New Issue
Block a user