1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

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 Transfer Modes
for suggestions that led to the addition of the 'Id' parameter to cAudio::Play(). 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 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> Rolf Hakenes <hakenes@hippomi.de>
for providing 'libdtv' and adapting the EIT mechanisms to it 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). - Changed MAXDPIDS to 16 (8xAC3 + 8xDTS) (thanks to Werner Fink for pointing this out).
- Completed Dutch language texts (thanks to Hans Dingemans). - Completed Dutch language texts (thanks to Hans Dingemans).
- Added 'smi' to the Finnish language codes (thanks to Rolf Ahrenberg). - 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 * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #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)); strn0cpy(availableTracks[t].description, Description, sizeof(availableTracks[t].description));
if (Id) if (Id)
availableTracks[t].id = Id; // setting 'id' last to avoid the need for extensive locking availableTracks[t].id = Id; // setting 'id' last to avoid the need for extensive locking
if (t == currentAudioTrack) if (!availableTracks[currentAudioTrack].id && currentAudioTrackMissingCount++ > NumAudioTracks() * 10)
currentAudioTrackMissingCount = 0;
else if (!availableTracks[currentAudioTrack].id && currentAudioTrackMissingCount++ > NumAudioTracks() * 10)
EnsureAudioTrack(); EnsureAudioTrack();
else if (t == currentAudioTrack)
currentAudioTrackMissingCount = 0;
return true; return true;
} }
else else