diff options
author | Mark Thompson <sw@jkqxz.net> | 2019-07-28 19:23:15 +0100 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2020-01-06 12:03:38 -0300 |
commit | 07afe2e3ca2e33a52acd142ba0595e495589de96 (patch) | |
tree | 13c0d3d9ba99db5455146e7718abed0f94828fa6 | |
parent | 1ad341851968bd41980531e4c00fb9592399cfcd (diff) | |
download | ffmpeg-07afe2e3ca2e33a52acd142ba0595e495589de96.tar.gz |
cbs_h264: Fix missing inferred colour description fields
With video_signal_type_present_flag set but colour_description_present_flag
unset the colour fields would not have had their correct values inferred.
(cherry picked from commit f9b8503639c0ff90846f07c92e2fe7836690dd0c)
-rw-r--r-- | libavcodec/cbs_h264_syntax_template.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/cbs_h264_syntax_template.c b/libavcodec/cbs_h264_syntax_template.c index 07b4cddb5e..57fc02082c 100644 --- a/libavcodec/cbs_h264_syntax_template.c +++ b/libavcodec/cbs_h264_syntax_template.c @@ -137,6 +137,10 @@ static int FUNC(vui_parameters)(CodedBitstreamContext *ctx, RWContext *rw, u(8, colour_primaries, 0, 255); u(8, transfer_characteristics, 0, 255); u(8, matrix_coefficients, 0, 255); + } else { + infer(colour_primaries, 2); + infer(transfer_characteristics, 2); + infer(matrix_coefficients, 2); } } else { infer(video_format, 5); |