diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2008-03-07 15:44:52 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2008-03-07 15:44:52 +0100 |
commit | 8bfee7a1b4d581685fdef82416ff624e5fca8853 (patch) | |
tree | 9674b9bf334a6100a6bdafbdcf57e8e60487b911 /device.c | |
parent | 21e7de9ec546caa561ee44e56e8b8b8031f4df8c (diff) | |
download | vdr-8bfee7a1b4d581685fdef82416ff624e5fca8853.tar.gz vdr-8bfee7a1b4d581685fdef82416ff624e5fca8853.tar.bz2 |
Fixed automatically selecting the preferred subtitle language
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 1.155 2008/02/23 13:09:01 kls Exp $ + * $Id: device.c 1.156 2008/03/07 15:36:25 kls Exp $ */ #include "device.h" @@ -1096,8 +1096,8 @@ void cDevice::EnsureAudioTrack(bool Force) void cDevice::EnsureSubtitleTrack(void) { if (Setup.DisplaySubtitles) { - eTrackType PreferredTrack = ttSubtitleFirst; - int LanguagePreference = -1; + eTrackType PreferredTrack = ttNone; + 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)) |