[FFmpeg-cvslog] avformat/ffmenc: use ff_parse_creation_time_metadata

Marton Balint git at videolan.org
Sun Feb 14 02:50:11 CET 2016


ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sat Feb  6 17:58:01 2016 +0100| [83b01ed21239e88dba09b05cde5c2cd5b65f20e0] | committer: Marton Balint

avformat/ffmenc: use ff_parse_creation_time_metadata

FYI this muxer bails out on parse error and not just warn the user.

Signed-off-by: Marton Balint <cus at passwd.hu>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=83b01ed21239e88dba09b05cde5c2cd5b65f20e0
---

 libavformat/ffmenc.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/libavformat/ffmenc.c b/libavformat/ffmenc.c
index f0b5743..0f23b79 100644
--- a/libavformat/ffmenc.c
+++ b/libavformat/ffmenc.c
@@ -221,17 +221,13 @@ static int ffm_write_recommended_config(AVIOContext *pb, AVCodecContext *ctx, un
 static int ffm_write_header(AVFormatContext *s)
 {
     FFMContext *ffm = s->priv_data;
-    AVDictionaryEntry *t;
     AVStream *st;
     AVIOContext *pb = s->pb;
     AVCodecContext *codec;
     int bit_rate, i, ret;
 
-    if (t = av_dict_get(s->metadata, "creation_time", NULL, 0)) {
-        ret = av_parse_time(&ffm->start_time, t->value, 0);
-        if (ret < 0)
-            return ret;
-    }
+    if ((ret = ff_parse_creation_time_metadata(s, &ffm->start_time, 0)) < 0)
+        return ret;
 
     ffm->packet_size = FFM_PACKET_SIZE;
 



More information about the ffmpeg-cvslog mailing list