]> git.sesse.net Git - ffmpeg/commitdiff
avformat/mov: check color parameter type explicitly.
authorJochen Strunk <strunk@lesspain.de>
Tue, 24 Mar 2015 09:39:27 +0000 (10:39 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Mar 2015 13:06:03 +0000 (14:06 +0100)
Fixes ticket #4387.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Note, Vittorio Giovara had submitted a very similar fix to me privately
a few hours before this, iam applying Jochens because it comes with a
commit message too and i had not yet applied Vittorios, but For sake
of credit, Vittorio independently solved this first

libavformat/mov.c

index 1f57dab89a4ecac981b6156445c3e9da590bb4bb..dc31e5a6f73cb01b08fd759dffe27670c21cbb5f 100644 (file)
@@ -1001,7 +1001,7 @@ static int mov_read_colr(MOVContext *c, AVIOContext *pb, MOVAtom atom)
     av_dlog(c->fc, "%s: pri %d trc %d matrix %d",
             color_parameter_type, color_primaries, color_trc, color_matrix);
 
-    if (c->isom) {
+    if (strncmp(color_parameter_type, "nclx", 4) == 0) {
         uint8_t color_range = avio_r8(pb) >> 7;
         av_dlog(c->fc, " full %"PRIu8"", color_range);
         if (color_range)