[FFmpeg-cvslog] avformat/movenc: enable compressorname for mp4 mode
Zhao Zhili
git at videolan.org
Fri Jun 24 10:43:36 EEST 2022
ffmpeg | branch: master | Zhao Zhili <zhilizhao at tencent.com> | Fri Jun 24 15:05:18 2022 +0800| [2e6e28ebc102a617e9c3ccc9420d2263a20b39cc] | committer: Zhao Zhili
avformat/movenc: enable compressorname for mp4 mode
Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2e6e28ebc102a617e9c3ccc9420d2263a20b39cc
---
libavformat/movenc.c | 5 +++--
tests/ref/lavf/mp4 | 6 +++---
tests/ref/vsynth/vsynth1-mpeg4 | 2 +-
tests/ref/vsynth/vsynth2-mpeg4 | 2 +-
tests/ref/vsynth/vsynth3-mpeg4 | 2 +-
tests/ref/vsynth/vsynth_lena-mpeg4 | 2 +-
6 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index b7b2f46a17..68a46ba729 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2122,7 +2122,9 @@ static void find_compressor(char * compressor_name, int len, MOVTrack *track)
|| (track->par->width == 1440 && track->par->height == 1080)
|| (track->par->width == 1920 && track->par->height == 1080);
- if ((track->mode == MODE_AVIF || track->mode == MODE_MOV) &&
+ if ((track->mode == MODE_AVIF ||
+ track->mode == MODE_MOV ||
+ track->mode == MODE_MP4) &&
(encoder = av_dict_get(track->st->metadata, "encoder", NULL, 0))) {
av_strlcpy(compressor_name, encoder->value, 32);
} else if (track->par->codec_id == AV_CODEC_ID_MPEG2VIDEO && xdcam_res) {
@@ -2211,7 +2213,6 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex
avio_wb32(pb, 0); /* Data size (= 0) */
avio_wb16(pb, 1); /* Frame count (= 1) */
- /* FIXME not sure, ISO 14496-1 draft where it shall be set to 0 */
find_compressor(compressor_name, 32, track);
avio_w8(pb, strlen(compressor_name));
avio_write(pb, compressor_name, 31);
diff --git a/tests/ref/lavf/mp4 b/tests/ref/lavf/mp4
index 0becfd34f5..b05fa34d0b 100644
--- a/tests/ref/lavf/mp4
+++ b/tests/ref/lavf/mp4
@@ -1,9 +1,9 @@
-71c4ff2e747fe6f8169ff29244fe181d *tests/data/lavf/lavf.mp4
+a6e44724cab1c4b50c49b0fd227b87d3 *tests/data/lavf/lavf.mp4
312477 tests/data/lavf/lavf.mp4
tests/data/lavf/lavf.mp4 CRC=0x9d9a638a
-3c5734ad6d05e4afc2ccefef1385e882 *tests/data/lavf/lavf.mp4
+19cbdb02f2f3e35bae779e2323be1b8e *tests/data/lavf/lavf.mp4
321363 tests/data/lavf/lavf.mp4
tests/data/lavf/lavf.mp4 CRC=0xe8130120
-07348e31d11d92396e1eedc48ea14802 *tests/data/lavf/lavf.mp4
+8ab9dd09f02b6d8146a40fc3c918d979 *tests/data/lavf/lavf.mp4
312021 tests/data/lavf/lavf.mp4
tests/data/lavf/lavf.mp4 CRC=0x9d9a638a
diff --git a/tests/ref/vsynth/vsynth1-mpeg4 b/tests/ref/vsynth/vsynth1-mpeg4
index e5abc146bc..0926f3323e 100644
--- a/tests/ref/vsynth/vsynth1-mpeg4
+++ b/tests/ref/vsynth/vsynth1-mpeg4
@@ -1,4 +1,4 @@
-a7e57333c57e0f8a551374b063a41d9e *tests/data/fate/vsynth1-mpeg4.mp4
+7825630f9100ce18338dc598b56619ab *tests/data/fate/vsynth1-mpeg4.mp4
540105 tests/data/fate/vsynth1-mpeg4.mp4
f80ec173d37f2f91add031e95579a220 *tests/data/fate/vsynth1-mpeg4.out.rawvideo
stddev: 7.97 PSNR: 30.10 MAXDIFF: 105 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-mpeg4 b/tests/ref/vsynth/vsynth2-mpeg4
index 7857d45803..47725e0007 100644
--- a/tests/ref/vsynth/vsynth2-mpeg4
+++ b/tests/ref/vsynth/vsynth2-mpeg4
@@ -1,4 +1,4 @@
-b751a2d3b4e693ca39d4fafa0175fc9d *tests/data/fate/vsynth2-mpeg4.mp4
+74ab83b391f9c90f7f00fe2c3dfb6b3d *tests/data/fate/vsynth2-mpeg4.mp4
159330 tests/data/fate/vsynth2-mpeg4.mp4
2645405bc5350acc85ad72f3352f5135 *tests/data/fate/vsynth2-mpeg4.out.rawvideo
stddev: 6.02 PSNR: 32.53 MAXDIFF: 89 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth3-mpeg4 b/tests/ref/vsynth/vsynth3-mpeg4
index a241e929c6..e2489d0501 100644
--- a/tests/ref/vsynth/vsynth3-mpeg4
+++ b/tests/ref/vsynth/vsynth3-mpeg4
@@ -1,4 +1,4 @@
-7ca3bbb8bed55d558346d258f5bea440 *tests/data/fate/vsynth3-mpeg4.mp4
+963a2970c57e1c7d46e209d5392fbeec *tests/data/fate/vsynth3-mpeg4.mp4
26037 tests/data/fate/vsynth3-mpeg4.mp4
fc0d8c1e58d254031e6207dfcae8f867 *tests/data/fate/vsynth3-mpeg4.out.rawvideo
stddev: 9.66 PSNR: 28.43 MAXDIFF: 79 bytes: 86700/ 86700
diff --git a/tests/ref/vsynth/vsynth_lena-mpeg4 b/tests/ref/vsynth/vsynth_lena-mpeg4
index 375c3fc659..9b7984c68f 100644
--- a/tests/ref/vsynth/vsynth_lena-mpeg4
+++ b/tests/ref/vsynth/vsynth_lena-mpeg4
@@ -1,4 +1,4 @@
-a0d0edee19f6658d0e93d294e32a1a6f *tests/data/fate/vsynth_lena-mpeg4.mp4
+954162c34c24abe7a8fa6bfadcbb7dee *tests/data/fate/vsynth_lena-mpeg4.mp4
119742 tests/data/fate/vsynth_lena-mpeg4.mp4
9a1e085d9e488c5ead0c940c9612a37a *tests/data/fate/vsynth_lena-mpeg4.out.rawvideo
stddev: 5.34 PSNR: 33.57 MAXDIFF: 83 bytes: 7603200/ 7603200
More information about the ffmpeg-cvslog
mailing list