- if (o->stop_time != INT64_MAX && o->recording_time != INT64_MAX) {
- o->stop_time = INT64_MAX;
- av_log(NULL, AV_LOG_WARNING, "-t and -to cannot be used together; using -t.\n");
- }
-
- if (o->stop_time != INT64_MAX && o->recording_time == INT64_MAX) {
- if (o->stop_time <= o->start_time) {
- av_log(NULL, AV_LOG_WARNING, "-to value smaller than -ss; ignoring -to.\n");
- o->stop_time = INT64_MAX;
- } else {
- o->recording_time = o->stop_time - o->start_time;
- }
- }
-
- GROW_ARRAY(output_files, nb_output_files);
- of = av_mallocz(sizeof(*of));
- if (!of)
- exit(1);
- output_files[nb_output_files - 1] = of;
-
- of->ctx = oc;
- of->ost_index = nb_output_streams - oc->nb_streams;
- of->recording_time = o->recording_time;
- if (o->recording_time != INT64_MAX)
- oc->duration = o->recording_time;
- of->start_time = o->start_time;
- of->limit_filesize = o->limit_filesize;
- of->shortest = o->shortest;
- av_dict_copy(&of->opts, o->g->format_opts, 0);
-
-