mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Transformer: Simplify EncoderWrapper rotationDegrees logic.
Small refactoring change to simplify the logic a tiny bit by removing one unnecessary variable. No functional change intended. PiperOrigin-RevId: 501566533
This commit is contained in:
parent
d2c5a1bfb9
commit
e47307d95f
1 changed files with 2 additions and 3 deletions
|
|
@ -425,8 +425,7 @@ import org.checkerframework.dataflow.qual.Pure;
|
||||||
// frame before encoding, so the encoded frame's width >= height, and sets
|
// frame before encoding, so the encoded frame's width >= height, and sets
|
||||||
// rotationDegrees in the output Format to ensure the frame is displayed in the correct
|
// rotationDegrees in the output Format to ensure the frame is displayed in the correct
|
||||||
// orientation.
|
// orientation.
|
||||||
boolean flipOrientation = requestedWidth < requestedHeight;
|
if (requestedWidth < requestedHeight) {
|
||||||
if (flipOrientation) {
|
|
||||||
int temp = requestedWidth;
|
int temp = requestedWidth;
|
||||||
requestedWidth = requestedHeight;
|
requestedWidth = requestedHeight;
|
||||||
requestedHeight = temp;
|
requestedHeight = temp;
|
||||||
|
|
@ -477,7 +476,7 @@ import org.checkerframework.dataflow.qual.Pure;
|
||||||
fallbackListener.onTransformationRequestFinalized(
|
fallbackListener.onTransformationRequestFinalized(
|
||||||
createSupportedTransformationRequest(
|
createSupportedTransformationRequest(
|
||||||
transformationRequest,
|
transformationRequest,
|
||||||
/* hasOutputFormatRotation= */ flipOrientation,
|
/* hasOutputFormatRotation= */ outputRotationDegrees != 0,
|
||||||
requestedEncoderFormat,
|
requestedEncoderFormat,
|
||||||
encoderSupportedFormat,
|
encoderSupportedFormat,
|
||||||
supportedFallbackHdrMode));
|
supportedFallbackHdrMode));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue