mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
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().
This commit is contained in:
parent
81af4dec27
commit
d8e944c238
4 changed files with 14 additions and 8 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue