summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2019-07-28 19:23:15 +0100
committerMark Thompson <sw@jkqxz.net>2019-07-29 19:57:06 +0100
commitf9b8503639c0ff90846f07c92e2fe7836690dd0c (patch)
tree7e73c32010039b2cbf933156cc062f40b68e665b
parentccbab41039af424237eaac5c302c293ab97540f8 (diff)
downloadffmpeg-f9b8503639c0ff90846f07c92e2fe7836690dd0c.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.
-rw-r--r--libavcodec/cbs_h264_syntax_template.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/cbs_h264_syntax_template.c b/libavcodec/cbs_h264_syntax_template.c
index 26be6e590f..1671a15d33 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,
ub(8, colour_primaries);
ub(8, transfer_characteristics);
ub(8, matrix_coefficients);
+ } else {
+ infer(colour_primaries, 2);
+ infer(transfer_characteristics, 2);
+ infer(matrix_coefficients, 2);
}
} else {
infer(video_format, 5);