From 732cb71b03d385c27d6499a8833b6b945c9282fb Mon Sep 17 00:00:00 2001 From: phintuka Date: Sun, 17 Jun 2007 09:11:22 +0000 Subject: Select first SPU track if automatic SPU track selection is on and none of track languages matches --- device.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'device.c') diff --git a/device.c b/device.c index f7651f0b..20c1428e 100644 --- a/device.c +++ b/device.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: device.c,v 1.37 2007-04-12 22:53:36 phintuka Exp $ + * $Id: device.c,v 1.38 2007-06-17 09:11:22 phintuka Exp $ * */ @@ -1633,6 +1633,15 @@ void cXinelibDevice::EnsureDvdSpuTrack(void) track = 64; pref = 99; } + if(pref < 99) { + for(track = 0; track < 64; track++) + if(m_DvdSpuTrack[track].id != 0xffff) + if(m_CurrentDvdSpuTrack != track) { + LOGMSG("Auto-selecting (non-matching) %d. SPU track \'%s\'", + track, m_DvdSpuTrack[track].language); + cXinelibDevice::SetCurrentDvdSpuTrack(track); + } + } } if(!m_spuPresent) { -- cgit v1.2.3