mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Use C.SAMPLE_FLAG_SYNC
This commit is contained in:
parent
9d480ecd20
commit
40411269da
1 changed files with 2 additions and 5 deletions
|
|
@ -15,14 +15,12 @@
|
|||
*/
|
||||
package com.google.android.exoplayer.hls.parser;
|
||||
|
||||
import com.google.android.exoplayer.C;
|
||||
import com.google.android.exoplayer.SampleHolder;
|
||||
import com.google.android.exoplayer.upstream.BufferPool;
|
||||
import com.google.android.exoplayer.util.Assertions;
|
||||
import com.google.android.exoplayer.util.ParsableByteArray;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.media.MediaExtractor;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
|
|
@ -182,12 +180,11 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
|||
* @param offset The offset of the first byte after the end of the sample's data, relative to
|
||||
* the total number of bytes written to the buffer. Must be negative or zero.
|
||||
*/
|
||||
@SuppressLint("InlinedApi")
|
||||
public void commitSample(boolean isKeyframe, int offset) {
|
||||
Assertions.checkState(offset <= 0);
|
||||
int sampleSize = (int) (totalBytesWritten + offset - pendingSampleOffset);
|
||||
infoQueue.commitSample(pendingSampleTimeUs, pendingSampleOffset, sampleSize,
|
||||
isKeyframe ? MediaExtractor.SAMPLE_FLAG_SYNC : 0);
|
||||
isKeyframe ? C.SAMPLE_FLAG_SYNC : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue