Fixed ensuring there is a current audio track in case there is only one track

This commit is contained in:
Klaus Schmidinger 2005-02-26 11:46:37 +01:00
parent 5350b65b37
commit 6ef9ec9ac0
3 changed files with 8 additions and 4 deletions

View File

@ -275,6 +275,8 @@ Werner Fink <werner@suse.de>
Transfer Modes
for suggestions that led to the addition of the 'Id' parameter to cAudio::Play().
for pointing out that MAXDPIDS needs to be to 16 (8xAC3 + 8xDTS)
for reporting a problem with ensuring there is a current audio track in case there
is only one track
Rolf Hakenes <hakenes@hippomi.de>
for providing 'libdtv' and adapting the EIT mechanisms to it

View File

@ -3435,3 +3435,5 @@ Video Disk Recorder Revision History
- Changed MAXDPIDS to 16 (8xAC3 + 8xDTS) (thanks to Werner Fink for pointing this out).
- Completed Dutch language texts (thanks to Hans Dingemans).
- Added 'smi' to the Finnish language codes (thanks to Rolf Ahrenberg).
- Fixed ensuring there is a current audio track in case there is only one track
(thanks to Werner Fink for reporting this one).

View File

@ -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