Handle decoder exceptions in dequeueInputBuffer

This commit is contained in:
Cameron Gutman 2017-05-18 10:25:48 -07:00
parent d0ecde1e16
commit 686490ba70

View File

@ -358,9 +358,14 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer {
startTime = MediaCodecHelper.getMonotonicMillis();
try {
while (rendererThread.isAlive() && index < 0 && !stopping) {
index = videoDecoder.dequeueInputBuffer(10000);
}
} catch (Exception e) {
handleDecoderException(e, null, 0);
return MediaCodec.INFO_TRY_AGAIN_LATER;
}
if (index < 0) {
return index;