From 48b49e230352de10bb3f66a1c85d367dade52001 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Wed, 17 Feb 2010 08:13:34 +0100
Subject: replay_gain: fall back to track gain if album gain is unavailable

---
 src/filter/replay_gain_filter_plugin.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/filter')

diff --git a/src/filter/replay_gain_filter_plugin.c b/src/filter/replay_gain_filter_plugin.c
index 396f185cc..248690d17 100644
--- a/src/filter/replay_gain_filter_plugin.c
+++ b/src/filter/replay_gain_filter_plugin.c
@@ -184,9 +184,10 @@ replay_gain_filter_set_info(struct filter *_filter,
 	struct replay_gain_filter *filter =
 		(struct replay_gain_filter *)_filter;
 
-	if (info != NULL)
+	if (info != NULL) {
 		filter->info = *info;
-	else
+		replay_gain_info_complete(&filter->info);
+	} else
 		replay_gain_info_init(&filter->info);
 
 	replay_gain_filter_update(filter);
-- 
cgit v1.2.3