mirror of
https://github.com/samsonjs/media.git
synced 2026-03-28 09:55:48 +00:00
Fix outputHeight pass-through condition.
The outputHeight in the TransformationRequest is the height of
the frame as it would be displayed (i.e., after applying any
rotation specified in the format). So pass-through should only
be used if the requested outputHeight matches the input
format's height after applying the rotation.
PiperOrigin-RevId: 457934867
(cherry picked from commit c74cf1f1aa)
This commit is contained in:
parent
c812c80a2f
commit
47cc8aaf92
1 changed files with 4 additions and 1 deletions
|
|
@ -148,8 +148,11 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||
if (transformationRequest.scaleY != 1f) {
|
||||
return false;
|
||||
}
|
||||
// The decoder rotates encoded frames for display by inputFormat.rotationDegrees.
|
||||
int decodedHeight =
|
||||
(inputFormat.rotationDegrees % 180 == 0) ? inputFormat.height : inputFormat.width;
|
||||
if (transformationRequest.outputHeight != C.LENGTH_UNSET
|
||||
&& transformationRequest.outputHeight != inputFormat.height) {
|
||||
&& transformationRequest.outputHeight != decodedHeight) {
|
||||
return false;
|
||||
}
|
||||
if (!effects.isEmpty()) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue