From dc503e3406b87fed7258af737bc17990fe245b38 Mon Sep 17 00:00:00 2001 From: Cody Henthorne Date: Mon, 22 Aug 2022 11:52:37 -0400 Subject: [PATCH] Prevent video thumbnail creation from crashing the app. --- .../video/videoconverter/VideoThumbnailsExtractor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/video/videoconverter/VideoThumbnailsExtractor.java b/app/src/main/java/org/thoughtcrime/securesms/video/videoconverter/VideoThumbnailsExtractor.java index d90aa45ca2..8f7309d69e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/video/videoconverter/VideoThumbnailsExtractor.java +++ b/app/src/main/java/org/thoughtcrime/securesms/video/videoconverter/VideoThumbnailsExtractor.java @@ -76,7 +76,7 @@ final class VideoThumbnailsExtractor { outputHeightRotated = outputHeight; } - Log.i(TAG, "video: " + width + "x" + height + " " + rotation); + Log.i(TAG, "video :" + width + "x" + height + " " + rotation); Log.i(TAG, "output: " + outputWidthRotated + "x" + outputHeightRotated); outputSurface = new OutputSurface(outputWidthRotated, outputHeightRotated, true); @@ -97,8 +97,8 @@ final class VideoThumbnailsExtractor { doExtract(extractor, decoder, outputSurface, outputWidthRotated, outputHeightRotated, duration, thumbnailCount, callback); } - } catch (IllegalArgumentException | IOException | TranscodingException | MediaCodec.CodecException e) { - Log.w(TAG, e); + } catch (Throwable t) { + Log.w(TAG, t); callback.failed(); } finally { if (outputSurface != null) {