diff options
author | Clément Bœsch <clement.boesch@smartjog.com> | 2012-10-05 16:46:01 +0200 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2012-10-08 09:03:19 +0200 |
commit | f7c46d251c9a2d645568c2c38c543e5e31fac812 (patch) | |
tree | afc0502c0544d751c7ced9bdba2175e7b0ff3c48 /ffmpeg_opt.c | |
parent | 9425dc3dba0bd1209aa7a788ea8f3c194fc7c7c5 (diff) | |
download | ffmpeg-f7c46d251c9a2d645568c2c38c543e5e31fac812.tar.gz |
ffserver: fix seeking with ?date=...
Regression since 5f847bf61dca1fd1a2f65a2f56c9a99d1cb716ab.
After this commit, timestamps pushed by FFmpeg won't be relative
anymore, but absolute (based on the date/time at the beginning of the
push). This will allow seeking to work properly. Before this patch, the
seek was done, but ffm timestamps were way smallers than the absolute
requested timestamp (based on a date), so the seek was done, but to the
end of the stream (which was similar to no effect at all).
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r-- | ffmpeg_opt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index bce66f825b..323ae8b869 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -1368,8 +1368,11 @@ 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 0; + return err; } static void init_output_filter(OutputFilter *ofilter, OptionsContext *o, |