Commit a17ee411 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/movenc: only ommit encoder tag of the metadata for bitexact mode

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 25bcf24d
......@@ -2225,7 +2225,8 @@ static int mov_write_ilst_tag(AVIOContext *pb, MOVMuxContext *mov,
mov_write_string_metadata(s, pb, "\251wrt", "composer" , 1);
mov_write_string_metadata(s, pb, "\251alb", "album" , 1);
mov_write_string_metadata(s, pb, "\251day", "date" , 1);
if (!mov_write_string_metadata(s, pb, "\251too", "encoding_tool", 1))
if (!mov->exact &&
!mov_write_string_metadata(s, pb, "\251too", "encoding_tool", 1))
mov_write_string_tag(pb, "\251too", LIBAVFORMAT_IDENT, 0, 1);
mov_write_string_metadata(s, pb, "\251cmt", "comment" , 1);
mov_write_string_metadata(s, pb, "\251gen", "genre" , 1);
......@@ -2345,14 +2346,9 @@ static int mov_write_udta_tag(AVIOContext *pb, MOVMuxContext *mov,
AVFormatContext *s)
{
AVIOContext *pb_buf;
int i, ret, size;
int ret, size;
uint8_t *buf;
for (i = 0; i < s->nb_streams; i++)
if (mov->tracks[i].enc->flags & CODEC_FLAG_BITEXACT) {
return 0;
}
ret = avio_open_dyn_buf(&pb_buf);
if (ret < 0)
return ret;
......@@ -3767,6 +3763,10 @@ static int mov_write_header(AVFormatContext *s)
else if (!strcmp("f4v", s->oformat->name)) mov->mode = MODE_F4V;
}
for (i = 0; i < s->nb_streams; i++)
if (s->streams[i]->codec->flags & CODEC_FLAG_BITEXACT)
mov->exact = 1;
/* Set the FRAGMENT flag if any of the fragmentation methods are
* enabled. */
if (mov->max_fragment_duration || mov->max_fragment_size ||
......
......@@ -156,6 +156,7 @@ typedef struct MOVMuxContext {
int flags;
int rtp_flags;
int exact;
int iods_skip;
int iods_video_profile;
......
cf3d43e6de1f97681583ba08d9fe5938
3c685e807d4961924d0abcc18b3f8fa8
df243ab73b33905776bdaefb79d14be8 *./tests/data/lavf/lavf.ismv
312453 ./tests/data/lavf/lavf.ismv
17b0b8eff852edd25fa38aed062689d7 *./tests/data/lavf/lavf.ismv
312546 ./tests/data/lavf/lavf.ismv
./tests/data/lavf/lavf.ismv CRC=0xb7d29d29
c40d80b3b35c9cd1324dead65dfcdb69 *./tests/data/lavf/lavf.ismv
321359 ./tests/data/lavf/lavf.ismv
543e5146df7bd4b7eb7edc94e0034ad9 *./tests/data/lavf/lavf.ismv
321452 ./tests/data/lavf/lavf.ismv
./tests/data/lavf/lavf.ismv CRC=0x33834815
df243ab73b33905776bdaefb79d14be8 *./tests/data/lavf/lavf.ismv
312453 ./tests/data/lavf/lavf.ismv
17b0b8eff852edd25fa38aed062689d7 *./tests/data/lavf/lavf.ismv
312546 ./tests/data/lavf/lavf.ismv
./tests/data/lavf/lavf.ismv CRC=0xb7d29d29
65ba2cff95100a4914b2ff507eb42818 *./tests/data/lavf/lavf.mov
366421 ./tests/data/lavf/lavf.mov
23150fc2d9980d5b0c50713e4271858a *./tests/data/lavf/lavf.mov
366449 ./tests/data/lavf/lavf.mov
./tests/data/lavf/lavf.mov CRC=0xbb2b949b
b9b988b23b5e5aff8760d0475908f837 *./tests/data/lavf/lavf.mov
357511 ./tests/data/lavf/lavf.mov
faa9a584701f112013e7f6ed7e97d8a4 *./tests/data/lavf/lavf.mov
357539 ./tests/data/lavf/lavf.mov
./tests/data/lavf/lavf.mov CRC=0xbb2b949b
5c5c79e09490763a2692c91c5985b7ea *./tests/data/lavf/lavf.mov
366593 ./tests/data/lavf/lavf.mov
0badb31442bdd8ecf2d1dc2ed2a94561 *./tests/data/lavf/lavf.mov
366621 ./tests/data/lavf/lavf.mov
./tests/data/lavf/lavf.mov CRC=0xa9793231
c1d4ff07ccad169cb6fca003661f0c12 *./tests/data/lavf/lavf.mov
356893 ./tests/data/lavf/lavf.mov
74d318eab7cacb39f3aec00ae8f85422 *./tests/data/lavf/lavf.mov
356921 ./tests/data/lavf/lavf.mov
./tests/data/lavf/lavf.mov CRC=0xbb2b949b
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1739 size: 27837
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
ret: 0 st:-1 flags:0 ts:-1.000000
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1739 size: 27837
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
ret: 0 st:-1 flags:1 ts: 1.894167
ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326943 size: 1024
ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326971 size: 1024
ret: 0 st: 0 flags:0 ts: 0.788359
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327967 size: 27834
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327995 size: 27834
ret: 0 st: 0 flags:1 ts:-0.317500
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1739 size: 27837
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
ret:-1 st: 1 flags:0 ts: 2.576667
ret: 0 st: 1 flags:1 ts: 1.470839
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327967 size: 27834
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327995 size: 27834
ret: 0 st:-1 flags:0 ts: 0.365002
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 165221 size: 27925
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 165249 size: 27925
ret: 0 st:-1 flags:1 ts:-0.740831
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1739 size: 27837
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
ret:-1 st: 0 flags:0 ts: 2.153359
ret: 0 st: 0 flags:1 ts: 1.047500
ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326943 size: 1024
ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326971 size: 1024
ret: 0 st: 1 flags:0 ts:-0.058322
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1739 size: 27837
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
ret: 0 st: 1 flags:1 ts: 2.835828
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327967 size: 27834
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327995 size: 27834
ret:-1 st:-1 flags:0 ts: 1.730004
ret: 0 st:-1 flags:1 ts: 0.624171
ret: 0 st: 1 flags:1 dts: 0.464399 pts: 0.464399 pos: 164197 size: 1024
ret: 0 st: 1 flags:1 dts: 0.464399 pts: 0.464399 pos: 164225 size: 1024
ret: 0 st: 0 flags:0 ts:-0.481641
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1739 size: 27837
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
ret: 0 st: 0 flags:1 ts: 2.412500
ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326943 size: 1024
ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326971 size: 1024
ret:-1 st: 1 flags:0 ts: 1.306667
ret: 0 st: 1 flags:1 ts: 0.200839
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1739 size: 27837
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
ret: 0 st:-1 flags:0 ts:-0.904994
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1739 size: 27837
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
ret: 0 st:-1 flags:1 ts: 1.989173
ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326943 size: 1024
ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326971 size: 1024
ret: 0 st: 0 flags:0 ts: 0.883359
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327967 size: 27834
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327995 size: 27834
ret: 0 st: 0 flags:1 ts:-0.222500
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1739 size: 27837
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
ret:-1 st: 1 flags:0 ts: 2.671678
ret: 0 st: 1 flags:1 ts: 1.565850
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327967 size: 27834
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327995 size: 27834
ret: 0 st:-1 flags:0 ts: 0.460008
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 165221 size: 27925
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 165249 size: 27925
ret: 0 st:-1 flags:1 ts:-0.645825
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1739 size: 27837
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
a52ff2ce472737e07462d6b51673a886 *tests/data/fate/vsynth1-mpeg4.mp4
540024 tests/data/fate/vsynth1-mpeg4.mp4
b4e8871c504a22c8c874c7e845b73da7 *tests/data/fate/vsynth1-mpeg4.mp4
540085 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
3d99aa9393f2a1a9319580b78df2bf3d *tests/data/fate/vsynth2-mpeg4.mp4
119661 tests/data/fate/vsynth2-mpeg4.mp4
4a029747434d24d128b078a5e6aa1e88 *tests/data/fate/vsynth2-mpeg4.mp4
119722 tests/data/fate/vsynth2-mpeg4.mp4
9a1e085d9e488c5ead0c940c9612a37a *tests/data/fate/vsynth2-mpeg4.out.rawvideo
stddev: 5.34 PSNR: 33.57 MAXDIFF: 83 bytes: 7603200/ 7603200
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment