aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2016-02-28 03:11:34 +0100
committerMarton Balint <cus@passwd.hu>2016-03-03 01:37:18 +0100
commit28fbdece79d2f8d0df6669bbf577214de153a0bc (patch)
tree08ae7e11b2631a102fb1d31e327c2644e79e0a4b
parente7dd97b5d8cd6ea150446591f37a5946e8ab7cfb (diff)
downloadffmpeg-28fbdece79d2f8d0df6669bbf577214de153a0bc.tar.gz
avformat: use ff_standardize_creation_time for formats writing all format string metadata
Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r--libavformat/apetag.c1
-rw-r--r--libavformat/cafenc.c1
-rw-r--r--libavformat/flvenc.c1
-rw-r--r--libavformat/id3v2enc.c1
-rw-r--r--libavformat/lrcenc.c1
-rw-r--r--libavformat/nutenc.c1
-rw-r--r--libavformat/smjpegenc.c1
-rw-r--r--libavformat/wtvenc.c1
8 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/apetag.c b/libavformat/apetag.c
index 2ee277f864..9d415b8b3e 100644
--- a/libavformat/apetag.c
+++ b/libavformat/apetag.c
@@ -193,6 +193,7 @@ int ff_ape_write_tag(AVFormatContext *s)
APE_TAG_FLAG_IS_HEADER);
ffio_fill(dyn_bc, 0, 8); // reserved
+ ff_standardize_creation_time(s);
while ((e = av_dict_get(s->metadata, "", e, AV_DICT_IGNORE_SUFFIX))) {
int val_len;
diff --git a/libavformat/cafenc.c b/libavformat/cafenc.c
index 544bc4a114..0b2f649463 100644
--- a/libavformat/cafenc.c
+++ b/libavformat/cafenc.c
@@ -175,6 +175,7 @@ static int caf_write_header(AVFormatContext *s)
avio_write(pb, enc->extradata, enc->extradata_size);
}
+ ff_standardize_creation_time(s);
if (av_dict_count(s->metadata)) {
ffio_wfourcc(pb, "info"); //< Information chunk
while ((t = av_dict_get(s->metadata, "", t, AV_DICT_IGNORE_SUFFIX))) {
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 8fd5d29431..ab71d41df7 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -281,6 +281,7 @@ static void write_metadata(AVFormatContext *s, unsigned int ts)
put_amf_double(pb, 0.0);
}
+ ff_standardize_creation_time(s);
while ((tag = av_dict_get(s->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) {
if( !strcmp(tag->key, "width")
||!strcmp(tag->key, "height")
diff --git a/libavformat/id3v2enc.c b/libavformat/id3v2enc.c
index 8b804c4d4a..e4ccdf9fb3 100644
--- a/libavformat/id3v2enc.c
+++ b/libavformat/id3v2enc.c
@@ -242,6 +242,7 @@ int ff_id3v2_write_metadata(AVFormatContext *s, ID3v2EncContext *id3)
ID3v2_ENCODING_UTF8;
int i, ret;
+ ff_standardize_creation_time(s);
if ((ret = write_metadata(s->pb, &s->metadata, id3, enc)) < 0)
return ret;
diff --git a/libavformat/lrcenc.c b/libavformat/lrcenc.c
index b316ccd6d8..74268cc681 100644
--- a/libavformat/lrcenc.c
+++ b/libavformat/lrcenc.c
@@ -52,6 +52,7 @@ static int lrc_write_header(AVFormatContext *s)
}
avpriv_set_pts_info(s->streams[0], 64, 1, 100);
+ ff_standardize_creation_time(s);
ff_metadata_conv_ctx(s, ff_lrc_metadata_conv, NULL);
if(!(s->flags & AVFMT_FLAG_BITEXACT)) { // avoid breaking regression tests
/* LRC provides a metadata slot for specifying encoder version
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index d8af5ea001..3a415a4584 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -496,6 +496,7 @@ static int write_globalinfo(NUTContext *nut, AVIOContext *bc)
if (ret < 0)
return ret;
+ ff_standardize_creation_time(s);
while ((t = av_dict_get(s->metadata, "", t, AV_DICT_IGNORE_SUFFIX)))
count += add_info(dyn_bc, t->key, t->value);
diff --git a/libavformat/smjpegenc.c b/libavformat/smjpegenc.c
index 430a497c6e..4553c8624c 100644
--- a/libavformat/smjpegenc.c
+++ b/libavformat/smjpegenc.c
@@ -46,6 +46,7 @@ static int smjpeg_write_header(AVFormatContext *s)
avio_wb32(pb, 0);
avio_wb32(pb, 0);
+ ff_standardize_creation_time(s);
while ((t = av_dict_get(s->metadata, "", t, AV_DICT_IGNORE_SUFFIX))) {
avio_wl32(pb, SMJPEG_TXT);
avio_wb32(pb, strlen(t->key) + strlen(t->value) + 3);
diff --git a/libavformat/wtvenc.c b/libavformat/wtvenc.c
index 0894b7fe60..908448f1df 100644
--- a/libavformat/wtvenc.c
+++ b/libavformat/wtvenc.c
@@ -672,6 +672,7 @@ static void write_table_entries_attrib(AVFormatContext *s)
AVIOContext *pb = s->pb;
AVDictionaryEntry *tag = 0;
+ ff_standardize_creation_time(s);
//FIXME: translate special tags (e.g. WM/Bitrate) to binary representation
ff_metadata_conv(&s->metadata, ff_asf_metadata_conv, NULL);
while ((tag = av_dict_get(s->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))