From 8bd5d8bcbe4d9204564ab05e6976762e085b6152 Mon Sep 17 00:00:00 2001 From: hschlueter Date: Sun, 5 Dec 2021 22:08:21 +0000 Subject: [PATCH] Fix condition for when to use the FrameEditor. outputHeight is the actual output height while transformation.outputHeight could be Format.NO_VALUE causing the FrameEditor to be used more often than necessary in the old version. PiperOrigin-RevId: 414304251 --- .../java/androidx/media3/transformer/VideoSamplePipeline.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/transformer/src/main/java/androidx/media3/transformer/VideoSamplePipeline.java b/libraries/transformer/src/main/java/androidx/media3/transformer/VideoSamplePipeline.java index 8c7f7c28ce..c24b814679 100644 --- a/libraries/transformer/src/main/java/androidx/media3/transformer/VideoSamplePipeline.java +++ b/libraries/transformer/src/main/java/androidx/media3/transformer/VideoSamplePipeline.java @@ -80,8 +80,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull; throw createRendererException( e, rendererIndex, inputFormat, PlaybackException.ERROR_CODE_UNSPECIFIED); } - if (inputFormat.height != transformation.outputHeight - || !transformation.transformationMatrix.isIdentity()) { + if (inputFormat.height != outputHeight || !transformation.transformationMatrix.isIdentity()) { frameEditor = FrameEditor.create( context,