diff options
author | Clément Bœsch <u@pkh.me> | 2017-03-24 11:31:30 +0100 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2017-03-24 11:33:47 +0100 |
commit | 30ac66abf0995c3a9a6c5370d357e51268b1b69f (patch) | |
tree | f8728337843780b890fcc99217c265ee902df70d | |
parent | 0b3decc5964bf1f51ef13af58606aea5878a6ce9 (diff) | |
parent | 4b07ebf1eb13561492f7e3c30a67f34415016b3e (diff) | |
download | ffmpeg-30ac66abf0995c3a9a6c5370d357e51268b1b69f.tar.gz |
Merge commit '4b07ebf1eb13561492f7e3c30a67f34415016b3e'
* commit '4b07ebf1eb13561492f7e3c30a67f34415016b3e':
mov: Update colr values
Mostly noop, see a3cab3d43387add8914c1c471fc99d733227d81b
Only the use of av_color_{primaries,transfer,space}_name() is merged.
Merged-by: Clément Bœsch <u@pkh.me>
-rw-r--r-- | libavformat/mov.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 3754346f9e..5b82dd6fb8 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -41,6 +41,7 @@ #include "libavutil/opt.h" #include "libavutil/aes.h" #include "libavutil/aes_ctr.h" +#include "libavutil/pixdesc.h" #include "libavutil/sha.h" #include "libavutil/spherical.h" #include "libavutil/stereo3d.h" @@ -1362,12 +1363,14 @@ static int mov_read_colr(MOVContext *c, AVIOContext *pb, MOVAtom atom) else st->codecpar->color_range = AVCOL_RANGE_MPEG; } - if (color_primaries >= AVCOL_PRI_NB) + + if (!av_color_primaries_name(color_primaries)) color_primaries = AVCOL_PRI_UNSPECIFIED; - if (color_trc >= AVCOL_TRC_NB) + if (!av_color_transfer_name(color_trc)) color_trc = AVCOL_TRC_UNSPECIFIED; - if (color_matrix >= AVCOL_SPC_NB) + if (!av_color_space_name(color_matrix)) color_matrix = AVCOL_SPC_UNSPECIFIED; + st->codecpar->color_primaries = color_primaries; st->codecpar->color_trc = color_trc; st->codecpar->color_space = color_matrix; |