vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Fri Jul 20 
17:21:07 2012 +0300| [b2c2e1c76c9e0c4f5c4aba1778ff4b6bde8214b0] | committer: 
Rémi Denis-Courmont

aout: avoid duplicate check in replay gain

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b2c2e1c76c9e0c4f5c4aba1778ff4b6bde8214b0
---

 src/audio_output/volume.c |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/audio_output/volume.c b/src/audio_output/volume.c
index 20cbd32..0991a8b 100644
--- a/src/audio_output/volume.c
+++ b/src/audio_output/volume.c
@@ -154,13 +154,6 @@ static float aout_ReplayGainSelect(vlc_object_t *obj, 
const char *str,
         else
         if (!strcmp (str, "album"))
             mode = AUDIO_REPLAY_GAIN_ALBUM;
-
-        /* If the selectrf mode is not available, prefer the other one */
-        if (mode != AUDIO_REPLAY_GAIN_MAX && !replay_gain->pb_gain[mode])
-        {
-            if (replay_gain->pb_gain[!mode])
-                mode = !mode;
-        }
     }
 
     /* */
@@ -174,6 +167,10 @@ static float aout_ReplayGainSelect(vlc_object_t *obj, 
const char *str,
     {
         float gain;
 
+        /* If the selectrf mode is not available, prefer the other one */
+        if (!replay_gain->pb_gain[mode] && replay_gain->pb_gain[!mode])
+            mode = !mode;
+
         if (replay_gain->pb_gain[mode])
             gain = replay_gain->pf_gain[mode]
                  + var_InheritFloat (obj, "audio-replay-gain-preamp");

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to