Ignore signalEndOfStream() error

This may be called at any time to interrupt the current encoding,
including when MediaCodec is in an expected state.
This commit is contained in:
Romain Vimont 2024-11-10 11:40:31 +01:00
parent d5c213d6f7
commit 10b8e11e68

View File

@ -18,7 +18,11 @@ public class CaptureReset implements SurfaceCapture.CaptureListener {
public synchronized void reset() {
reset.set(true);
if (runningMediaCodec != null) {
try {
runningMediaCodec.signalEndOfInputStream();
} catch (IllegalStateException e) {
// ignore
}
}
}