mirror of
https://github.com/samsonjs/media.git
synced 2026-04-22 14:05:55 +00:00
Fix image up-side-down in when playing a Composition
When playing a Composition, the color transfer of an image is incorrectly passed down to be SMPTE170M, but it should be SRGB. PiperOrigin-RevId: 626425396
This commit is contained in:
parent
fb037b9847
commit
716aedd019
1 changed files with 5 additions and 3 deletions
|
|
@ -541,9 +541,11 @@ public final class CompositingVideoSinkProvider
|
|||
}
|
||||
|
||||
private static ColorInfo getAdjustedInputColorInfo(@Nullable ColorInfo inputColorInfo) {
|
||||
return inputColorInfo != null && ColorInfo.isTransferHdr(inputColorInfo)
|
||||
? inputColorInfo
|
||||
: ColorInfo.SDR_BT709_LIMITED;
|
||||
if (inputColorInfo == null || !inputColorInfo.isDataSpaceValid()) {
|
||||
return ColorInfo.SDR_BT709_LIMITED;
|
||||
}
|
||||
|
||||
return inputColorInfo;
|
||||
}
|
||||
|
||||
/** Receives input from an ExoPlayer renderer and forwards it to the video graph. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue