Fix subtitling logic in DCI naming.
authorCarl Hetherington <cth@carlh.net>
Wed, 17 Oct 2012 12:49:24 +0000 (13:49 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 17 Oct 2012 12:49:24 +0000 (13:49 +0100)
src/lib/film_state.cc

index 0d0bd6313667ca5e14c5d80322f600ea32868582..2717d55eea7e0c62e342fb626b5a13736b37a38c 100644 (file)
@@ -403,12 +403,10 @@ FilmState::dci_name () const
 
        if (!audio_language.empty ()) {
                d << audio_language;
-               if (with_subtitles) {
-                       if (!subtitle_language.empty ()) {
-                               d << "-" << subtitle_language;
-                       } else {
-                               d << "-XX";
-                       }
+               if (!subtitle_language.empty() && with_subtitles) {
+                       d << "-" << subtitle_language;
+               } else {
+                       d << "-XX";
                }
                        
                d << "_";