summaryrefslogtreecommitdiff
path: root/ffmpeg_opt.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-11-28 16:56:12 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-11-28 17:15:31 +0100
commitbda6f2937ea1be1f6d0d95374b4e9db2a70db288 (patch)
treeee1bf5dbebd4923055406fef797e48a781402005 /ffmpeg_opt.c
parent801b5c18c7beefbb894ad4de20d1b591ddb22198 (diff)
ffmpeg_opt: Fix starttime with ffm in bitexact mode
This fixes some differences between runs of the ffserver tests (in my local tree 2 runs gave the same result with this but i had other changes too) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r--ffmpeg_opt.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 7c570f3ac7..e470dbeb46 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -2046,7 +2046,7 @@ static int open_output_file(OptionsContext *o, const char *filename)
InputStream *ist;
AVDictionary *unused_opts = NULL;
AVDictionaryEntry *e = NULL;
-
+ int format_flags = 0;
if (o->stop_time != INT64_MAX && o->recording_time != INT64_MAX) {
o->stop_time = INT64_MAX;
@@ -2092,6 +2092,12 @@ static int open_output_file(OptionsContext *o, const char *filename)
file_oformat= oc->oformat;
oc->interrupt_callback = int_cb;
+ e = av_dict_get(o->g->format_opts, "fflags", NULL, 0);
+ if (e) {
+ const AVOption *o = av_opt_find(oc, "fflags", NULL, 0, 0);
+ av_opt_eval_flags(oc, o, e->value, &format_flags);
+ }
+
/* create streams for all unlabeled output pads */
for (i = 0; i < nb_filtergraphs; i++) {
FilterGraph *fg = filtergraphs[i];
@@ -2112,6 +2118,7 @@ static int open_output_file(OptionsContext *o, const char *filename)
/* ffserver seeking with date=... needs a date reference */
if (!strcmp(file_oformat->name, "ffm") &&
+ !(format_flags & AVFMT_FLAG_BITEXACT) &&
av_strstart(filename, "http:", NULL)) {
int err = parse_option(o, "metadata", "creation_time=now", options);
if (err < 0) {