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;
|
package com.google.android.exoplayer2.extractor.mp4;
|
||||||
|
|
||||||
|
import android.util.Log;
|
||||||
import android.util.Pair;
|
import android.util.Pair;
|
||||||
import com.google.android.exoplayer2.C;
|
import com.google.android.exoplayer2.C;
|
||||||
import com.google.android.exoplayer2.Format;
|
import com.google.android.exoplayer2.Format;
|
||||||
@ -38,6 +39,8 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
/* package */ final class AtomParsers {
|
/* package */ final class AtomParsers {
|
||||||
|
|
||||||
|
private static final String TAG = "AtomParsers";
|
||||||
|
|
||||||
private static final int TYPE_vide = Util.getIntegerCodeForString("vide");
|
private static final int TYPE_vide = Util.getIntegerCodeForString("vide");
|
||||||
private static final int TYPE_soun = Util.getIntegerCodeForString("soun");
|
private static final int TYPE_soun = Util.getIntegerCodeForString("soun");
|
||||||
private static final int TYPE_text = Util.getIntegerCodeForString("text");
|
private static final int TYPE_text = Util.getIntegerCodeForString("text");
|
||||||
@ -248,11 +251,16 @@ import java.util.List;
|
|||||||
remainingTimestampOffsetChanges--;
|
remainingTimestampOffsetChanges--;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check all the expected samples have been seen.
|
// If the stbl's child boxes are not consistent the container is malformed, but the stream may
|
||||||
Assertions.checkArgument(remainingSynchronizationSamples == 0);
|
// still be playable.
|
||||||
Assertions.checkArgument(remainingSamplesAtTimestampDelta == 0);
|
if (remainingSynchronizationSamples != 0 || remainingSamplesAtTimestampDelta != 0
|
||||||
Assertions.checkArgument(remainingSamplesInChunk == 0);
|
|| remainingSamplesInChunk != 0 || remainingTimestampDeltaChanges != 0) {
|
||||||
Assertions.checkArgument(remainingTimestampDeltaChanges == 0);
|
Log.w(TAG, "Inconsistent stbl box for track " + track.id
|
||||||
|
+ ": remainingSynchronizationSamples " + remainingSynchronizationSamples
|
||||||
|
+ ", remainingSamplesAtTimestampDelta " + remainingSamplesAtTimestampDelta
|
||||||
|
+ ", remainingSamplesInChunk " + remainingSamplesInChunk
|
||||||
|
+ ", remainingTimestampDeltaChanges " + remainingTimestampDeltaChanges);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
long[] chunkOffsetsBytes = new long[chunkIterator.length];
|
long[] chunkOffsetsBytes = new long[chunkIterator.length];
|
||||||
int[] chunkSampleCounts = new int[chunkIterator.length];
|
int[] chunkSampleCounts = new int[chunkIterator.length];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user