fftools: return errors from parse_number_or_die() instead of aborting

Rename the function to just parse_number().
This commit is contained in:
Anton Khirnov
2023-07-14 13:47:23 +02:00
parent 4adbe2d219
commit 9cb47c78d6
6 changed files with 83 additions and 27 deletions

View File

@@ -784,8 +784,11 @@ static int new_stream_video(Muxer *mux, const OptionsContext *o,
ost->vsync_method = video_sync_method;
MATCH_PER_STREAM_OPT(fps_mode, str, fps_mode, oc, st);
if (fps_mode)
parse_and_set_vsync(fps_mode, &ost->vsync_method, ost->file_index, ost->index, 0);
if (fps_mode) {
ret = parse_and_set_vsync(fps_mode, &ost->vsync_method, ost->file_index, ost->index, 0);
if (ret < 0)
return ret;
}
if ((ost->frame_rate.num || ost->max_frame_rate.num) &&
!(ost->vsync_method == VSYNC_AUTO ||