summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-02-26 11:46:37 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2005-02-26 11:46:37 +0100
commit6ef9ec9ac0863fdd15e15b1e332270f1b09ab849 (patch)
tree5f91afcb0d5655348ee9aeec3d31551763719701 /device.c
parent5350b65b3744ecfc7433131a9264993102b1086b (diff)
downloadvdr-6ef9ec9ac0863fdd15e15b1e332270f1b09ab849.tar.gz
vdr-6ef9ec9ac0863fdd15e15b1e332270f1b09ab849.tar.bz2
Fixed ensuring there is a current audio track in case there is only one track
Diffstat (limited to 'device.c')
-rw-r--r--device.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/device.c b/device.c
index d3a0765d..85d91235 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 1.95 2005/02/20 13:35:38 kls Exp $
+ * $Id: device.c 1.96 2005/02/26 11:45:10 kls Exp $
*/
#include "device.h"
@@ -719,10 +719,10 @@ bool cDevice::SetAvailableTrack(eTrackType Type, int Index, uint16_t Id, const c
strn0cpy(availableTracks[t].description, Description, sizeof(availableTracks[t].description));
if (Id)
availableTracks[t].id = Id; // setting 'id' last to avoid the need for extensive locking
- if (t == currentAudioTrack)
- currentAudioTrackMissingCount = 0;
- else if (!availableTracks[currentAudioTrack].id && currentAudioTrackMissingCount++ > NumAudioTracks() * 10)
+ if (!availableTracks[currentAudioTrack].id && currentAudioTrackMissingCount++ > NumAudioTracks() * 10)
EnsureAudioTrack();
+ else if (t == currentAudioTrack)
+ currentAudioTrackMissingCount = 0;
return true;
}
else