Skip to content

Commit

Permalink
fftools/ffmpeg_filter: configure min_hard_comp unconditionally
Browse files Browse the repository at this point in the history
There are two issues here. Firstly, the floating-point comparison
is always true. Seconly, the code depends on the default value of
min_hard_comp implicitly, which can be dangerous.

Partially fixes ticket 9859.

Reviewed-by: Anton Khirnov <[email protected]>
Signed-off-by: Zhao Zhili <[email protected]>
  • Loading branch information
quink-black committed Sep 23, 2022
1 parent 668f43a commit 6860967
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fftools/ffmpeg_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -896,8 +896,7 @@ static int configure_input_audio_filter(FilterGraph *fg, InputFilter *ifilter,
char args[256] = {0};

av_strlcatf(args, sizeof(args), "async=%d", audio_sync_method);
if (audio_drift_threshold != 0.1)
av_strlcatf(args, sizeof(args), ":min_hard_comp=%f", audio_drift_threshold);
av_strlcatf(args, sizeof(args), ":min_hard_comp=%f", audio_drift_threshold);
if (!fg->reconfiguration)
av_strlcatf(args, sizeof(args), ":first_pts=0");
AUTO_INSERT_FILTER_INPUT("-async", "aresample", args);
Expand Down

0 comments on commit 6860967

Please sign in to comment.