diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-09 01:40:11 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-09 01:50:32 +0200 |
commit | d7fbe926d312af0848bfb22dbe03894b381848f3 (patch) | |
tree | 49d383a8f8870be6c2eb1e242726280571451293 | |
parent | a03e79ed5a71f77819e5242f69c16d43429fab09 (diff) | |
download | ffmpeg-d7fbe926d312af0848bfb22dbe03894b381848f3.tar.gz |
ffmpeg: move creation_time for ffserver setting up
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | ffmpeg_opt.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index b9429518a5..a459bc9c26 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -1509,9 +1509,6 @@ static int read_ffserver_streams(OptionsContext *o, AVFormatContext *s, const ch choose_pixel_fmt(st, codec, st->codec->pix_fmt); } - /* ffserver seeking with date=... needs a date reference */ - err = parse_option(o, "metadata", "creation_time=now", options); - avformat_close_input(&ic); return err; } @@ -1639,6 +1636,16 @@ static int open_output_file(OptionsContext *o, const char *filename) } } + /* ffserver seeking with date=... needs a date reference */ + if (!strcmp(file_oformat->name, "ffm") && + av_strstart(filename, "http:", NULL)) { + int err = parse_option(o, "metadata", "creation_time=now", options); + if (err < 0) { + print_error(filename, err); + exit_program(1); + } + } + if (!strcmp(file_oformat->name, "ffm") && av_strstart(filename, "http:", NULL)) { int j; |