From 18442b7f0af01b14a4c70696f06dd9e99542dab8 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 --- .../android/exoplayer2/transformer/VideoSamplePipeline.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/VideoSamplePipeline.java b/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/VideoSamplePipeline.java index 4962b8c046..3ca890e0d8 100644 --- a/library/transformer/src/main/java/com/google/android/exoplayer2/transformer/VideoSamplePipeline.java +++ b/library/transformer/src/main/java/com/google/android/exoplayer2/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,