[FFmpeg-devel] [PATCH 2/2] fftools/ffmpeg_filter: Fix audio_drift_threshold check
Michael Niedermayer
michael at niedermayer.cc
Tue Jun 28 15:14:00 EEST 2022
Variant 2
Found-by: mkver
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
fftools/ffmpeg_filter.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 0845c631a5..a204c4f65f 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <float.h>
#include <stdint.h>
#include "ffmpeg.h"
@@ -891,7 +892,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)
+ if (fabs(audio_drift_threshold - 0.1) > FLT_EPSILON)
av_strlcatf(args, sizeof(args), ":min_hard_comp=%f", audio_drift_threshold);
if (!fg->reconfiguration)
av_strlcatf(args, sizeof(args), ":first_pts=0");
--
2.17.1
More information about the ffmpeg-devel
mailing list