Ignore signalEndOfStream() error
This may be called at any time to interrupt the current encoding, including when MediaCodec is in an expected state. PR #5455 <https://github.com/Genymobile/scrcpy/pull/5455>
This commit is contained in:
parent
aaf79a94db
commit
d6a4205652
@ -18,7 +18,11 @@ public class CaptureReset implements SurfaceCapture.CaptureListener {
|
|||||||
public synchronized void reset() {
|
public synchronized void reset() {
|
||||||
reset.set(true);
|
reset.set(true);
|
||||||
if (runningMediaCodec != null) {
|
if (runningMediaCodec != null) {
|
||||||
runningMediaCodec.signalEndOfInputStream();
|
try {
|
||||||
|
runningMediaCodec.signalEndOfInputStream();
|
||||||
|
} catch (IllegalStateException e) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user