Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e2255b3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix for inputsize calculation" into main

parents c96b8dd8 b64cf016
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -72,8 +72,11 @@ public class MultiAccessUnitBlockModelDecoder extends BlockModelDecoder {
        final String mime = format.getString(MediaFormat.KEY_MIME);
        final int maxOutputSize = format.getNumber(
            MediaFormat.KEY_BUFFER_BATCH_MAX_OUTPUT_SIZE, 0).intValue();
        final int maxInputSizeInBytes = format.getInteger(
                MediaFormat.KEY_MAX_INPUT_SIZE);
        int maxInputSizeInBytes = 0;
        if (format.containsKey(MediaFormat.KEY_MAX_INPUT_SIZE)) {
            maxInputSizeInBytes = format.getNumber(
                    MediaFormat.KEY_MAX_INPUT_SIZE, 0).intValue();
        }
        mMaxInputSize = Math.max(maxInputSizeInBytes,
                (int) (maxOutputSize * CodecUtils.getCompressionRatio(mime)));
    }