[FFmpeg-devel] [PATCH] hevcdec: Correctly signal AVCOL_RANGE_UNSPECIFIED if nothing was set in the bitstream
Martin Storsjö
martin at martin.st
Thu Feb 17 14:54:39 EET 2022
This matches what the H264 decoder signals for such a case.
Signed-off-by: Martin Storsjö <martin at martin.st>
---
libavcodec/hevcdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 8d7a4f7147..01d459984f 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -338,7 +338,7 @@ static void export_stream_params(HEVCContext *s, const HEVCSPS *sps)
avctx->color_range = sps->vui.video_full_range_flag ? AVCOL_RANGE_JPEG
: AVCOL_RANGE_MPEG;
else
- avctx->color_range = AVCOL_RANGE_MPEG;
+ avctx->color_range = AVCOL_RANGE_UNSPECIFIED;
if (sps->vui.colour_description_present_flag) {
avctx->color_primaries = sps->vui.colour_primaries;
--
2.32.0 (Apple Git-132)
More information about the ffmpeg-devel
mailing list