summaryrefslogtreecommitdiff
path: root/libavcodec/av1_metadata_bsf.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-06-20 01:45:14 +0200
committerMark Thompson <sw@jkqxz.net>2019-07-28 18:23:07 +0100
commit43a188847cce63326c932b5226bb925f75df300e (patch)
treead24e9e9b7cfffb2d5cb60e9e0141a53b6711e30 /libavcodec/av1_metadata_bsf.c
parentd9182f04caa59c3ba2659981183238ada340f814 (diff)
av1/h264_metadata: Don't reinitialize data
If the relevant elements (the color description elements for AV1 and the VUI elements in general for H.264 (since 1156b507)) are absent, then their correct values (usually meaning unknown) have already been inferred by the reading process, so that it is unnecessary to initialize them again in the av1/h264_metadata filters even when they were initially absent. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/av1_metadata_bsf.c')
-rw-r--r--libavcodec/av1_metadata_bsf.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libavcodec/av1_metadata_bsf.c b/libavcodec/av1_metadata_bsf.c
index 226f7dffa4..dd0c9b6148 100644
--- a/libavcodec/av1_metadata_bsf.c
+++ b/libavcodec/av1_metadata_bsf.c
@@ -61,12 +61,7 @@ static int av1_metadata_update_sequence_header(AVBSFContext *bsf,
if (ctx->color_primaries >= 0 ||
ctx->transfer_characteristics >= 0 ||
ctx->matrix_coefficients >= 0) {
- if (!clc->color_description_present_flag) {
- clc->color_description_present_flag = 1;
- clc->color_primaries = AVCOL_PRI_UNSPECIFIED;
- clc->transfer_characteristics = AVCOL_TRC_UNSPECIFIED;
- clc->matrix_coefficients = AVCOL_SPC_UNSPECIFIED;
- }
+ clc->color_description_present_flag = 1;
if (ctx->color_primaries >= 0)
clc->color_primaries = ctx->color_primaries;