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.
|
* <p>The input buffer is cleared if it should be dropped.
|
||||||
*/
|
*/
|
||||||
protected boolean shouldDropInputBuffer(DecoderInputBuffer inputBuffer) {
|
protected abstract boolean shouldDropInputBuffer(DecoderInputBuffer inputBuffer);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Called before a {@link DecoderInputBuffer} is queued to the decoder. */
|
/** Called before a {@link DecoderInputBuffer} is queued to the decoder. */
|
||||||
protected void onDecoderInputReady(DecoderInputBuffer inputBuffer) {}
|
protected void onDecoderInputReady(DecoderInputBuffer inputBuffer) {}
|
||||||
|
@ -115,6 +115,10 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||||||
|
|
||||||
if (decoder == null) {
|
if (decoder == null) {
|
||||||
inputBuffer.timeUs -= streamStartPositionUs;
|
inputBuffer.timeUs -= streamStartPositionUs;
|
||||||
|
if (inputBuffer.timeUs < 0) {
|
||||||
|
inputBuffer.clear();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user