[FFmpeg-devel] [PATCH 2/3] avformat: set AVFMT_NEED_PARSED_CREATION_TIME flag for formats writing all format string metadata

Marton Balint cus at passwd.hu
Thu Feb 25 02:11:01 CET 2016


Signed-off-by: Marton Balint <cus at passwd.hu>
---
 libavformat/adtsenc.c   | 2 +-
 libavformat/aiffenc.c   | 1 +
 libavformat/cafenc.c    | 1 +
 libavformat/flvenc.c    | 2 +-
 libavformat/lrcenc.c    | 3 ++-
 libavformat/mp3enc.c    | 2 +-
 libavformat/nutenc.c    | 3 ++-
 libavformat/omaenc.c    | 2 +-
 libavformat/smjpegenc.c | 2 +-
 libavformat/wtvenc.c    | 1 +
 libavformat/wvenc.c     | 2 +-
 11 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/libavformat/adtsenc.c b/libavformat/adtsenc.c
index 242d738..e004914 100644
--- a/libavformat/adtsenc.c
+++ b/libavformat/adtsenc.c
@@ -207,5 +207,5 @@ AVOutputFormat ff_adts_muxer = {
     .write_packet      = adts_write_packet,
     .write_trailer     = adts_write_trailer,
     .priv_class        = &adts_muxer_class,
-    .flags             = AVFMT_NOTIMESTAMPS,
+    .flags             = AVFMT_NOTIMESTAMPS | AVFMT_NEED_PARSED_CREATION_TIME,
 };
diff --git a/libavformat/aiffenc.c b/libavformat/aiffenc.c
index 25dc5e6..a9d4cbb 100644
--- a/libavformat/aiffenc.c
+++ b/libavformat/aiffenc.c
@@ -330,5 +330,6 @@ AVOutputFormat ff_aiff_muxer = {
     .write_packet      = aiff_write_packet,
     .write_trailer     = aiff_write_trailer,
     .codec_tag         = (const AVCodecTag* const []){ ff_codec_aiff_tags, 0 },
+    .flags             = AVFMT_NEED_PARSED_CREATION_TIME,
     .priv_class        = &aiff_muxer_class,
 };
diff --git a/libavformat/cafenc.c b/libavformat/cafenc.c
index 544bc4a..8975c4d 100644
--- a/libavformat/cafenc.c
+++ b/libavformat/cafenc.c
@@ -268,4 +268,5 @@ AVOutputFormat ff_caf_muxer = {
     .write_packet   = caf_write_packet,
     .write_trailer  = caf_write_trailer,
     .codec_tag      = (const AVCodecTag* const []){ff_codec_caf_tags, 0},
+    .flags          = AVFMT_NEED_PARSED_CREATION_TIME,
 };
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 8fd5d29..a8d6aa0 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -714,6 +714,6 @@ AVOutputFormat ff_flv_muxer = {
                           flv_video_codec_ids, flv_audio_codec_ids, 0
                       },
     .flags          = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS |
-                      AVFMT_TS_NONSTRICT,
+                      AVFMT_TS_NONSTRICT | AVFMT_NEED_PARSED_CREATION_TIME,
     .priv_class     = &flv_muxer_class,
 };
diff --git a/libavformat/lrcenc.c b/libavformat/lrcenc.c
index b316ccd..ce75071 100644
--- a/libavformat/lrcenc.c
+++ b/libavformat/lrcenc.c
@@ -147,6 +147,7 @@ AVOutputFormat ff_lrc_muxer = {
     .write_header   = lrc_write_header,
     .write_packet   = lrc_write_packet,
     .flags          = AVFMT_VARIABLE_FPS | AVFMT_GLOBALHEADER |
-                      AVFMT_TS_NEGATIVE | AVFMT_TS_NONSTRICT,
+                      AVFMT_TS_NEGATIVE | AVFMT_TS_NONSTRICT |
+                      AVFMT_NEED_PARSED_CREATION_TIME,
     .subtitle_codec = AV_CODEC_ID_SUBRIP
 };
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index 71f5178..7d0d0b0 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -627,7 +627,7 @@ AVOutputFormat ff_mp3_muxer = {
     .write_packet      = mp3_write_packet,
     .write_trailer     = mp3_write_trailer,
     .query_codec       = query_codec,
-    .flags             = AVFMT_NOTIMESTAMPS,
+    .flags             = AVFMT_NOTIMESTAMPS | AVFMT_NEED_PARSED_CREATION_TIME,
     .priv_class        = &mp3_muxer_class,
 };
 #endif
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index b6582ef..ef1515a 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -1235,7 +1235,8 @@ AVOutputFormat ff_nut_muxer = {
     .write_packet   = nut_write_packet,
     .write_trailer  = nut_write_trailer,
     .deinit         = nut_write_deinit,
-    .flags          = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS,
+    .flags          = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS |
+                      AVFMT_NEED_PARSED_CREATION_TIME,
     .codec_tag      = ff_nut_codec_tags,
     .priv_class     = &class,
 };
diff --git a/libavformat/omaenc.c b/libavformat/omaenc.c
index fe0669f..d5fe783 100644
--- a/libavformat/omaenc.c
+++ b/libavformat/omaenc.c
@@ -103,5 +103,5 @@ AVOutputFormat ff_oma_muxer = {
     .write_header      = oma_write_header,
     .write_packet      = ff_raw_write_packet,
     .codec_tag         = (const AVCodecTag* const []){ff_oma_codec_tags, 0},
-    .flags             = AVFMT_NOTIMESTAMPS,
+    .flags             = AVFMT_NOTIMESTAMPS | AVFMT_NEED_PARSED_CREATION_TIME,
 };
diff --git a/libavformat/smjpegenc.c b/libavformat/smjpegenc.c
index 430a497..f1ec392 100644
--- a/libavformat/smjpegenc.c
+++ b/libavformat/smjpegenc.c
@@ -141,6 +141,6 @@ AVOutputFormat ff_smjpeg_muxer = {
     .write_header   = smjpeg_write_header,
     .write_packet   = smjpeg_write_packet,
     .write_trailer  = smjpeg_write_trailer,
-    .flags          = AVFMT_GLOBALHEADER | AVFMT_TS_NONSTRICT,
+    .flags          = AVFMT_GLOBALHEADER | AVFMT_TS_NONSTRICT | AVFMT_NEED_PARSED_CREATION_TIME,
     .codec_tag      = (const AVCodecTag *const []){ ff_codec_smjpeg_video_tags, ff_codec_smjpeg_audio_tags, 0 },
 };
diff --git a/libavformat/wtvenc.c b/libavformat/wtvenc.c
index 0894b7f..4c22909 100644
--- a/libavformat/wtvenc.c
+++ b/libavformat/wtvenc.c
@@ -842,4 +842,5 @@ AVOutputFormat ff_wtv_muxer = {
     .write_trailer  = write_trailer,
     .codec_tag      = (const AVCodecTag* const []){ ff_codec_bmp_tags,
                                                     ff_codec_wav_tags, 0 },
+    .flags          = AVFMT_NEED_PARSED_CREATION_TIME,
 };
diff --git a/libavformat/wvenc.c b/libavformat/wvenc.c
index b0d74ca..a840d84 100644
--- a/libavformat/wvenc.c
+++ b/libavformat/wvenc.c
@@ -87,5 +87,5 @@ AVOutputFormat ff_wv_muxer = {
     .write_header      = wv_write_header,
     .write_packet      = wv_write_packet,
     .write_trailer     = wv_write_trailer,
-    .flags             = AVFMT_NOTIMESTAMPS,
+    .flags             = AVFMT_NOTIMESTAMPS | AVFMT_NEED_PARSED_CREATION_TIME,
 };
-- 
2.6.2



More information about the ffmpeg-devel mailing list