diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-12-11 14:12:08 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-07-23 11:53:19 +0200 |
commit | d8e944c2385fab726beb48011ebe1e48b84fe96c (patch) | |
tree | fc097801baa1b2b6eb2c877f3d98b58a818ed053 /fftools/ffmpeg.c | |
parent | 81af4dec27b6e0db7b7ed80bf96aaaccbf702954 (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.c')
-rw-r--r-- | fftools/ffmpeg.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index d9b512ce59..42c11e84ad 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3462,10 +3462,8 @@ static int need_output(void) for (i = 0; i < nb_output_streams; i++) { OutputStream *ost = output_streams[i]; OutputFile *of = output_files[ost->file_index]; - AVFormatContext *os = output_files[ost->file_index]->ctx; - if (ost->finished || - (os->pb && avio_tell(os->pb) >= of->limit_filesize)) + if (ost->finished || of_finished(of)) continue; if (ost->frame_number >= ost->max_frames) { int j; |