pmt: Handle Default Audio DDP and Siplify selection code
authorAthanasios Oikonomou <athoik@gmail.com>
Sat, 23 Aug 2014 17:34:32 +0000 (19:34 +0200)
committerErik Slagter <erik@openpli.org>
Sat, 23 Aug 2014 17:34:32 +0000 (19:34 +0200)
Signed-off-by: Erik Slagter <erik@openpli.org>

lib/dvb/pmt.cpp

index 5ffd35d..f5028aa 100755 (executable)
@@ -525,27 +525,22 @@ int eDVBServicePMTHandler::getProgramInfo(program &program)
 
                if (useaudio_cache && audio_cached != -1)
                        program.defaultAudioStream = audio_cached;
-               else if ( defaultac3 )
-               {
-                       if ( autoaudio_ac3 != -1 )
-                               program.defaultAudioStream = autoaudio_ac3;
-                       else if ( autoaudio_ddp != -1 )
-                               program.defaultAudioStream = autoaudio_ddp;
-                       else if ( autoaudio_mpeg != -1 )
-                               program.defaultAudioStream = autoaudio_mpeg;
-                       else if ( first_non_mpeg != -1 )
-                               program.defaultAudioStream = first_non_mpeg;
-               }
+               else if (defaultac3 && autoaudio_ac3 != -1)
+                       program.defaultAudioStream = autoaudio_ac3;
+               else if (defaultddp && autoaudio_ddp != -1)
+                       program.defaultAudioStream = autoaudio_ddp;
                else
                {
-                       if ( autoaudio_mpeg != -1 )
+                       if (autoaudio_mpeg != -1)
                                program.defaultAudioStream = autoaudio_mpeg;
-                       else if ( autoaudio_ac3 != -1 )
+                       else if (autoaudio_ac3 != -1)
                                program.defaultAudioStream = autoaudio_ac3;
-                       else if ( autoaudio_ddp != -1 )
+                       else if (autoaudio_ddp != -1)
                                program.defaultAudioStream = autoaudio_ddp;
-                       else if ( autoaudio_aache != -1 )
+                       else if (autoaudio_aache != -1)
                                program.defaultAudioStream = autoaudio_aache;
+                       else if (first_non_mpeg != -1)
+                               program.defaultAudioStream = first_non_mpeg;
                }
 
                bool allow_hearingimpaired = eConfigManager::getConfigBoolValue("config.autolanguage.subtitle_hearingimpaired");