Mediacodec Signalendofinputstream() Error
Solution 1:
You can work around it.
If you look at DecodeEditEncodeTest, you can see a mysterious boolean called WORK_AROUND_BUGS
. It's used like this:
if (WORK_AROUND_BUGS) {
// Might drop a frame, but at least we won't crash mediaserver.try { Thread.sleep(500); } catch (InterruptedException ie) {}
outputDone = true;
} else {
encoder.signalEndOfInputStream();
}
This was used during the development of the CTS tests, when the vendor-specific code wasn't yet working well with the end-of-stream signal. It was added so we could exercise other features while the vendors worked on patches. The flag was disabled before the tests shipped in 4.3. You're probably running into unpatched codecs on Cyanogen.
The workaround is to simply never send the end-of-stream signal. Instead, you just stop the codec. There is some chance that an in-flight buffer will be lost and you will drop a frame, but for a live recording this may not matter. (It's more of an issue for video editing.)
Post a Comment for "Mediacodec Signalendofinputstream() Error"