ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Tue Sep 26 14:48:22 2017 -0300| [a6596831a03d4b56a485436f7c328a039509b8dd] | committer: James Almer
Merge commit '708e84cda1bdbffb92847f3d6ccf6fbeb26d9948' * commit '708e84cda1bdbffb92847f3d6ccf6fbeb26d9948': mov: Avoid memcmp of uninitialised data Merged-by: James Almer <jamr...@gmail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a6596831a03d4b56a485436f7c328a039509b8dd --- libavformat/mov.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 2519707345..2de60b2159 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1890,14 +1890,14 @@ static void mov_parse_stsd_video(MOVContext *c, AVIOContext *pb, av_dict_set(&st->metadata, "encoder", codec_name, 0); /* codec_tag YV12 triggers an UV swap in rawdec.c */ - if (!memcmp(codec_name, "Planar Y'CbCr 8-bit 4:2:0", 25)) { + if (!strncmp(codec_name, "Planar Y'CbCr 8-bit 4:2:0", 25)) { st->codecpar->codec_tag = MKTAG('I', '4', '2', '0'); st->codecpar->width &= ~1; st->codecpar->height &= ~1; } /* Flash Media Server uses tag H.263 with Sorenson Spark */ if (st->codecpar->codec_tag == MKTAG('H','2','6','3') && - !memcmp(codec_name, "Sorenson H263", 13)) + !strncmp(codec_name, "Sorenson H263", 13)) st->codecpar->codec_id = AV_CODEC_ID_FLV1; st->codecpar->bits_per_coded_sample = avio_rb16(pb); /* depth */ ====================================================================== diff --cc libavformat/mov.c index 2519707345,9afd0202ca..2de60b2159 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@@ -1890,14 -1455,11 +1890,14 @@@ static void mov_parse_stsd_video(MOVCon av_dict_set(&st->metadata, "encoder", codec_name, 0); /* codec_tag YV12 triggers an UV swap in rawdec.c */ - if (!memcmp(codec_name, "Planar Y'CbCr 8-bit 4:2:0", 25)) { - if (!strncmp(codec_name, "Planar Y'CbCr 8-bit 4:2:0", 25)) ++ if (!strncmp(codec_name, "Planar Y'CbCr 8-bit 4:2:0", 25)) { st->codecpar->codec_tag = MKTAG('I', '4', '2', '0'); + st->codecpar->width &= ~1; + st->codecpar->height &= ~1; + } /* Flash Media Server uses tag H.263 with Sorenson Spark */ if (st->codecpar->codec_tag == MKTAG('H','2','6','3') && - !memcmp(codec_name, "Sorenson H263", 13)) + !strncmp(codec_name, "Sorenson H263", 13)) st->codecpar->codec_id = AV_CODEC_ID_FLV1; st->codecpar->bits_per_coded_sample = avio_rb16(pb); /* depth */ _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog