diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-10-13 13:34:24 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-10-15 14:48:40 +0100 |
commit | 74b02377980321934e33969c84733ace7e9f4eeb (patch) | |
tree | 5005754c880d5cd50a363a2d99a641cf1bcb4fdb | |
parent | 1ac5a29b2e5ddeae068deb9d6e0e803a91941d4d (diff) | |
download | ffmpeg-74b02377980321934e33969c84733ace7e9f4eeb.tar.gz |
mov: Correctly check the color transfer characteristics range
Reported-by: Ruoyu <liangry@ucweb.com>
-rw-r--r-- | libavformat/mov.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 2b64cbf365..0e29bf3f23 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -923,7 +923,8 @@ static int mov_read_colr(MOVContext *c, AVIOContext *pb, MOVAtom atom) * 23001-8) so some adjusting is required */ if (color_primaries >= AVCOL_PRI_FILM) color_primaries = AVCOL_PRI_UNSPECIFIED; - if (color_trc >= AVCOL_TRC_LINEAR || color_trc <= AVCOL_TRC_LOG_SQRT || + if ((color_trc >= AVCOL_TRC_LINEAR && + color_trc <= AVCOL_TRC_LOG_SQRT) || color_trc >= AVCOL_TRC_BT2020_10) color_trc = AVCOL_TRC_UNSPECIFIED; if (color_matrix >= AVCOL_SPC_BT2020_NCL) |