From b50452fc37a74cab50a44948efa944edd077af92 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Fri, 27 Feb 2009 11:17:50 -0800 Subject: rgvolume: ignore out-of-range peak values If the peak value is > 1 (and thus nonsensical) ignore it. Prevents rgvolume reducing volume to effectively silent on files with bogus peak values. --- gst/replaygain/gstrgvolume.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gst/replaygain') diff --git a/gst/replaygain/gstrgvolume.c b/gst/replaygain/gstrgvolume.c index 41fe441d..d569b4bb 100644 --- a/gst/replaygain/gstrgvolume.c +++ b/gst/replaygain/gstrgvolume.c @@ -92,7 +92,7 @@ enum #define PEAK_FORMAT ".06f" #define VALID_GAIN(x) ((x) > -60.00 && (x) < 60.00) -#define VALID_PEAK(x) ((x) > 0.) +#define VALID_PEAK(x) ((x) > 0. && (x) < 1.) /* Same template caps as GstVolume, for I don't like having just ANY caps. */ -- cgit