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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user