summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg_opt.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-12-11 14:12:08 +0100
committerAnton Khirnov <anton@khirnov.net>2022-07-23 11:53:19 +0200
commitd8e944c2385fab726beb48011ebe1e48b84fe96c (patch)
treefc097801baa1b2b6eb2c877f3d98b58a818ed053 /fftools/ffmpeg_opt.c
parent81af4dec27b6e0db7b7ed80bf96aaaccbf702954 (diff)
fftools/ffmpeg: refactor limiting output file size with -fs
Move the file size checking code to ffmpeg_mux. Use the recently introduced of_filesize(), making this code consistent with the size shown by print_report().
Diffstat (limited to 'fftools/ffmpeg_opt.c')
-rw-r--r--fftools/ffmpeg_opt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index c9ff272731..1a2161470c 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -2403,7 +2403,6 @@ static int open_output_file(OptionsContext *o, const char *filename)
of->ost_index = nb_output_streams;
of->recording_time = 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);
@@ -3006,7 +3005,7 @@ loop_end:
exit_program(1);
}
- err = of_muxer_init(of);
+ err = of_muxer_init(of, o->limit_filesize);
if (err < 0) {
av_log(NULL, AV_LOG_FATAL, "Error initializing internal muxing state\n");
exit_program(1);