You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-10-06 05:47:18 +02:00
avcodec/av1dec: don't overwrite container level color information if none is coded in the bitstream
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -774,11 +774,13 @@ static int set_context_with_sequence(AVCodecContext *avctx,
|
||||
avctx->profile = seq->seq_profile;
|
||||
avctx->level = seq->seq_level_idx[0];
|
||||
|
||||
if (seq->color_config.color_description_present_flag) {
|
||||
avctx->color_range =
|
||||
seq->color_config.color_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
|
||||
avctx->color_primaries = seq->color_config.color_primaries;
|
||||
avctx->colorspace = seq->color_config.matrix_coefficients;
|
||||
avctx->color_trc = seq->color_config.transfer_characteristics;
|
||||
}
|
||||
|
||||
switch (seq->color_config.chroma_sample_position) {
|
||||
case AV1_CSP_VERTICAL:
|
||||
|
Reference in New Issue
Block a user