summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-02-28 09:28:54 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2012-02-28 09:28:54 +0100
commita188928e6ea462e45da7c363a3098065c4691953 (patch)
tree38df657c0469ed718850a22278931a8530ea15d7 /device.c
parentd2d4dacf5b7d1c3369316bd043dc3f2f7c84ec32 (diff)
downloadvdr-a188928e6ea462e45da7c363a3098065c4691953.tar.gz
vdr-a188928e6ea462e45da7c363a3098065c4691953.tar.bz2
Added support for automatically selecting subtitles when playing old PES recordings made with the subtitles plugin
Diffstat (limited to 'device.c')
-rw-r--r--device.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/device.c b/device.c
index e1ae304c..9f6af55f 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 2.50 2012/02/25 12:45:53 kls Exp $
+ * $Id: device.c 2.51 2012/02/28 09:25:57 kls Exp $
*/
#include "device.h"
@@ -1046,7 +1046,8 @@ void cDevice::EnsureSubtitleTrack(void)
int LanguagePreference = INT_MAX; // higher than the maximum possible value
for (int i = ttSubtitleFirst; i <= ttSubtitleLast; i++) {
const tTrackId *TrackId = GetTrack(eTrackType(i));
- if (TrackId && TrackId->id && I18nIsPreferredLanguage(Setup.SubtitleLanguages, TrackId->language, LanguagePreference))
+ if (TrackId && TrackId->id && (I18nIsPreferredLanguage(Setup.SubtitleLanguages, TrackId->language, LanguagePreference) ||
+ (i == ttSubtitleFirst + 8 && !*TrackId->language && LanguagePreference == INT_MAX))) // compatibility mode for old subtitles plugin
PreferredTrack = eTrackType(i);
}
// Make sure we're set to an available subtitle track: