Browse Source

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>
tags/n3.1
Marton Balint 10 years ago
parent
commit
28fbdece79
8 changed files with 8 additions and 0 deletions
  1. +1
    -0
      libavformat/apetag.c
  2. +1
    -0
      libavformat/cafenc.c
  3. +1
    -0
      libavformat/flvenc.c
  4. +1
    -0
      libavformat/id3v2enc.c
  5. +1
    -0
      libavformat/lrcenc.c
  6. +1
    -0
      libavformat/nutenc.c
  7. +1
    -0
      libavformat/smjpegenc.c
  8. +1
    -0
      libavformat/wtvenc.c

+ 1
- 0
libavformat/apetag.c View File

@@ -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;



+ 1
- 0
libavformat/cafenc.c View File

@@ -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))) {


+ 1
- 0
libavformat/flvenc.c View File

@@ -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")


+ 1
- 0
libavformat/id3v2enc.c View File

@@ -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;



+ 1
- 0
libavformat/lrcenc.c View File

@@ -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


+ 1
- 0
libavformat/nutenc.c View File

@@ -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);



+ 1
- 0
libavformat/smjpegenc.c View File

@@ -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);


+ 1
- 0
libavformat/wtvenc.c View File

@@ -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)))


Loading…
Cancel
Save