Commit c22e2ec9 authored by Andrey Utkin's avatar Andrey Utkin Committed by Anton Khirnov

avconv: set AVFormatContext.duration from '-t'

Set output files duration to recording_time option, if given.
Rationale: to save duration into metadata for file that is written to
non-seekable output, for formats like FLV (with metadata at beginning).
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 3dffa1b4
......@@ -3955,6 +3955,8 @@ static void opt_output_file(void *optctx, const char *filename)
output_files[nb_output_files - 1].ctx = oc;
output_files[nb_output_files - 1].ost_index = nb_output_streams - oc->nb_streams;
output_files[nb_output_files - 1].recording_time = o->recording_time;
if (o->recording_time != INT64_MAX)
oc->duration = o->recording_time;
output_files[nb_output_files - 1].start_time = o->start_time;
output_files[nb_output_files - 1].limit_filesize = o->limit_filesize;
av_dict_copy(&output_files[nb_output_files - 1].opts, format_opts, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment