]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mov.c
Merge commit 'e6e3dcba0c6f11bd7022e2d3b9bcb7b6a09d6c80'
[ffmpeg] / libavformat / mov.c
index 09f2097a5a790b63fad646842326e02033df40f4..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)
@@ -2949,7 +2949,7 @@ static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 
         for (i = 0; i < 3; i++)
             for (j = 0; j < 3; j++)
-                sc->display_matrix[i * 3 + j] = display_matrix[j][i];
+                sc->display_matrix[i * 3 + j] = display_matrix[i][j];
 
         rotate = av_display_rotation_get(sc->display_matrix);
         if (!isnan(rotate)) {