Skip to content

Commit

Permalink
Prevent video thumbnail creation from crashing the app.
Browse files Browse the repository at this point in the history
  • Loading branch information
cody-signal committed Aug 22, 2022
1 parent ab3e0b8 commit dc503e3
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -76,7 +76,7 @@ static void extractThumbnails(final @NonNull MediaInput input,
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);
Expand All @@ -97,8 +97,8 @@ static void extractThumbnails(final @NonNull MediaInput input,

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) {
Expand Down

0 comments on commit dc503e3

Please sign in to comment.