Prevent crash when thumbnail decoder cannot stop, log instead.

This commit is contained in:
Alex Hart 2021-04-16 09:29:58 -03:00
parent b7118b6bd8
commit e97a14f617

View file

@ -105,7 +105,11 @@ final class VideoThumbnailsExtractor {
outputSurface.release();
}
if (decoder != null) {
decoder.stop();
try {
decoder.stop();
} catch (MediaCodec.CodecException codecException) {
Log.w(TAG, "Decoder stop failed: " + codecException.getDiagnosticInfo(), codecException);
}
decoder.release();
}
if (extractor != null) {