diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-16 16:26:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-16 16:26:35 +0100 |
commit | a17ee4117dcb2922f57da33b8401d11b06e81cba (patch) | |
tree | bd87c69953957c32ac914b81270e67c153a2b130 /libavformat | |
parent | 25bcf24d4d0faf0191923be8afac8f67ca98b500 (diff) | |
download | ffmpeg-a17ee4117dcb2922f57da33b8401d11b06e81cba.tar.gz |
avformat/movenc: only ommit encoder tag of the metadata for bitexact mode
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/movenc.c | 14 | ||||
-rw-r--r-- | libavformat/movenc.h | 1 |
2 files changed, 8 insertions, 7 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 47594d04da..d4ff7f08c6 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -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 || diff --git a/libavformat/movenc.h b/libavformat/movenc.h index 09f3ea772c..81b2613230 100644 --- a/libavformat/movenc.h +++ b/libavformat/movenc.h @@ -156,6 +156,7 @@ typedef struct MOVMuxContext { int flags; int rtp_flags; + int exact; int iods_skip; int iods_video_profile; |