X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fmov.c;h=c63e817276ec4fcaba9572304f47eee84f7cd87d;hb=db4ac46fed9b12e3597903c5e99cce146bb05c7e;hp=1f57dab89a4ecac981b6156445c3e9da590bb4bb;hpb=a2dd2d7998a775167c18e844193b3686590934c1;p=ffmpeg diff --git a/libavformat/mov.c b/libavformat/mov.c index 1f57dab89a4..c63e817276e 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -342,7 +342,7 @@ retry: if (c->itunes_metadata && atom.size > 8) { int data_size = avio_rb32(pb); int tag = avio_rl32(pb); - if (tag == MKTAG('d','a','t','a')) { + if (tag == MKTAG('d','a','t','a') && data_size <= atom.size) { data_type = avio_rb32(pb); // type avio_rb32(pb); // unknown str_size = data_size - 16; @@ -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)