summaryrefslogtreecommitdiff
path: root/libavcodec/hevc_ps.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2017-04-08 14:41:10 +0200
committerClément Bœsch <u@pkh.me>2017-04-08 14:41:10 +0200
commit883fe17e3bef8ae176876273bef6b7a81f413bc7 (patch)
tree929cb44a0476c80110624ca14029214192f0c0c3 /libavcodec/hevc_ps.c
parent5be1440c74d017b935a447b4dc979b7bb11f6aff (diff)
parentff9db5cfd14558df9cfcc54d6c062bc34bf1f341 (diff)
downloadffmpeg-883fe17e3bef8ae176876273bef6b7a81f413bc7.tar.gz
Merge commit 'ff9db5cfd14558df9cfcc54d6c062bc34bf1f341'
* commit 'ff9db5cfd14558df9cfcc54d6c062bc34bf1f341': lavc: Use a stricter check for the color properties values Merged-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libavcodec/hevc_ps.c')
-rw-r--r--libavcodec/hevc_ps.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index acd55cc513..6d67dd9c69 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -568,11 +568,11 @@ static void decode_vui(GetBitContext *gb, AVCodecContext *avctx,
vui->matrix_coeffs = get_bits(gb, 8);
// Set invalid values to "unspecified"
- if (vui->colour_primaries >= AVCOL_PRI_NB)
+ if (!av_color_primaries_name(vui->colour_primaries))
vui->colour_primaries = AVCOL_PRI_UNSPECIFIED;
- if (vui->transfer_characteristic >= AVCOL_TRC_NB)
+ if (!av_color_transfer_name(vui->transfer_characteristic))
vui->transfer_characteristic = AVCOL_TRC_UNSPECIFIED;
- if (vui->matrix_coeffs >= AVCOL_SPC_NB)
+ if (!av_color_space_name(vui->matrix_coeffs))
vui->matrix_coeffs = AVCOL_SPC_UNSPECIFIED;
if (vui->matrix_coeffs == AVCOL_SPC_RGB) {
switch (sps->pix_fmt) {