mirror of
https://github.com/samsonjs/media.git
synced 2026-04-04 11:05:47 +00:00
Signal end-of-stream after creating latch
The output end-of-stream notification from the last shader could theoretically arrive before the latch for detecting it is created, which might cause waiting on the latch indefinitely. Create the latch before signaling end of stream so that it's guaranteed to be set before the end-of-stream signal arrives. PiperOrigin-RevId: 532056472
This commit is contained in:
parent
0a86790be2
commit
857e6ebee8
1 changed files with 1 additions and 1 deletions
|
|
@ -374,9 +374,9 @@ public final class DefaultVideoFrameProcessor implements VideoFrameProcessor {
|
|||
}
|
||||
}
|
||||
|
||||
checkNotNull(textureManager).signalEndOfCurrentInputStream();
|
||||
// Wait until the current input stream is processed before continuing to the next input.
|
||||
latch = new CountDownLatch(1);
|
||||
checkNotNull(textureManager).signalEndOfCurrentInputStream();
|
||||
try {
|
||||
latch.await();
|
||||
} catch (InterruptedException e) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue