This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit a8f1c2366e23ad35f34e2a9af0cd63f38e26fc00 Author: James Almer <[email protected]> AuthorDate: Sun Dec 28 15:21:06 2025 -0300 Commit: James Almer <[email protected]> CommitDate: Sun Dec 28 15:31:13 2025 -0300 avcodec/libaomdec: don't overwrite color information from the container if unset in the bitstream Fixes part of #21304. Signed-off-by: James Almer <[email protected]> --- libavcodec/libaomdec.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavcodec/libaomdec.c b/libavcodec/libaomdec.c index 9e9c4d18c5..79b299bac8 100644 --- a/libavcodec/libaomdec.c +++ b/libavcodec/libaomdec.c @@ -71,9 +71,12 @@ static int set_pix_fmt(AVCodecContext *avctx, struct aom_image *img) AVCOL_RANGE_MPEG, AVCOL_RANGE_JPEG }; avctx->color_range = color_ranges[img->range]; - avctx->color_primaries = (enum AVColorPrimaries)img->cp; - avctx->colorspace = (enum AVColorSpace)img->mc; - avctx->color_trc = (enum AVColorTransferCharacteristic)img->tc; + if (img->cp != AOM_CICP_CP_UNSPECIFIED) + avctx->color_primaries = (enum AVColorPrimaries)img->cp; + if (img->mc != AOM_CICP_MC_UNSPECIFIED) + avctx->colorspace = (enum AVColorSpace)img->mc; + if (img->tc != AOM_CICP_TC_UNSPECIFIED) + avctx->color_trc = (enum AVColorTransferCharacteristic)img->tc; switch (img->fmt) { case AOM_IMG_FMT_I420: _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
