Skip to content

Commit

Permalink
Set ColorInfo in decoder configuration format.
Browse files Browse the repository at this point in the history
Pass the color info and HDR static metadata when configuring the decoder
using MediaFormatUtil.maybeSetColorInfo.

PiperOrigin-RevId: 460424985
  • Loading branch information
hmsch authored and rohitjoins committed Jul 12, 2022
1 parent a5ff4ef commit 66e1229
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public Codec createForVideoDecoding(
MediaFormatUtil.maybeSetInteger(
mediaFormat, MediaFormat.KEY_MAX_INPUT_SIZE, format.maxInputSize);
MediaFormatUtil.setCsdBuffers(mediaFormat, format.initializationData);
MediaFormatUtil.maybeSetColorInfo(mediaFormat, format.colorInfo);
if (decoderSupportsKeyAllowFrameDrop) {
// This key ensures no frame dropping when the decoder's output surface is full. This allows
// transformer to decode as many frames as possible in one render cycle.
Expand Down

0 comments on commit 66e1229

Please sign in to comment.