aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2015-06-15 20:40:46 +0200
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-06-30 15:34:38 +0200
commite95c7a61852cc5b9ce5445ff034b87553e61958a (patch)
tree849453e2a7d1db979800c6ecd1283aafb3d12759 /libavformat
parent303ec065a90498c29d384b4add2ac626bc38d5eb (diff)
downloadffmpeg-e95c7a61852cc5b9ce5445ff034b87553e61958a.tar.gz
mov: Preserve the metadata even when bit-exactness is requested
Make sure to not write the custom `encoder` string in that case. Bug-Id: 845 CC: libav-stable@libav.org
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/movenc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 761c3e8323..d8255c8fa1 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1768,7 +1768,7 @@ static int mov_write_track_udta_tag(AVIOContext *pb, MOVMuxContext *mov,
int ret, size;
uint8_t *buf;
- if (!st || mov->fc->flags & AVFMT_FLAG_BITEXACT)
+ if (!st)
return 0;
ret = avio_open_dyn_buf(&pb_buf);
@@ -2062,8 +2062,10 @@ 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))
- mov_write_string_tag(pb, "\251too", LIBAVFORMAT_IDENT, 0, 1);
+ if (!mov_write_string_metadata(s, pb, "\251too", "encoding_tool", 1)) {
+ if (!(s->flags & AVFMT_FLAG_BITEXACT))
+ 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);
mov_write_string_metadata(s, pb, "\251cpy", "copyright", 1);
@@ -2166,9 +2168,6 @@ static int mov_write_udta_tag(AVIOContext *pb, MOVMuxContext *mov,
int ret, size;
uint8_t *buf;
- if (s->flags & AVFMT_FLAG_BITEXACT)
- return 0;
-
ret = avio_open_dyn_buf(&pb_buf);
if (ret < 0)
return ret;
@@ -2188,7 +2187,8 @@ static int mov_write_udta_tag(AVIOContext *pb, MOVMuxContext *mov,
mov_write_string_metadata(s, pb_buf, "\251aut", "author", 0);
mov_write_string_metadata(s, pb_buf, "\251alb", "album", 0);
mov_write_string_metadata(s, pb_buf, "\251day", "date", 0);
- mov_write_string_metadata(s, pb_buf, "\251swr", "encoder", 0);
+ if (!(s->flags & AVFMT_FLAG_BITEXACT))
+ mov_write_string_metadata(s, pb_buf, "\251swr", "encoder", 0);
mov_write_string_metadata(s, pb_buf, "\251des", "comment", 0);
mov_write_string_metadata(s, pb_buf, "\251gen", "genre", 0);
mov_write_string_metadata(s, pb_buf, "\251cpy", "copyright", 0);