ExoAssetLoaderRenderer:Drop negative timestamp buffers when transmuxing
Prevents queuing unneeded buffers when transmuxing. (we already do this when transcoding). PiperOrigin-RevId: 576080462
This commit is contained in:
parent
64d93eb0d1
commit
771d203204
@ -174,9 +174,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
||||
*
|
||||
* <p>The input buffer is cleared if it should be dropped.
|
||||
*/
|
||||
protected boolean shouldDropInputBuffer(DecoderInputBuffer inputBuffer) {
|
||||
return false;
|
||||
}
|
||||
protected abstract boolean shouldDropInputBuffer(DecoderInputBuffer inputBuffer);
|
||||
|
||||
/** Called before a {@link DecoderInputBuffer} is queued to the decoder. */
|
||||
protected void onDecoderInputReady(DecoderInputBuffer inputBuffer) {}
|
||||
|
@ -115,6 +115,10 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
||||
|
||||
if (decoder == null) {
|
||||
inputBuffer.timeUs -= streamStartPositionUs;
|
||||
if (inputBuffer.timeUs < 0) {
|
||||
inputBuffer.clear();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user