mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed handling audio tracks in cDvbDevice
This commit is contained in:
parent
7233a63680
commit
413c2446be
1
HISTORY
1
HISTORY
@ -1681,3 +1681,4 @@ Video Disk Recorder Revision History
|
||||
Oliver Endriss).
|
||||
- Fixed the EPG scanner, which broke 'Transfer Mode' as soon as it kicked in
|
||||
(thanks to Oliver Endriss for reporting this one).
|
||||
- Fixed handling audio tracks in cDvbDevice.
|
||||
|
10
dvbdevice.c
10
dvbdevice.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: dvbdevice.c 1.31 2002/11/01 10:05:27 kls Exp $
|
||||
* $Id: dvbdevice.c 1.32 2002/11/01 11:24:47 kls Exp $
|
||||
*/
|
||||
|
||||
#include "dvbdevice.h"
|
||||
@ -616,21 +616,19 @@ int cDvbDevice::NumAudioTracksDevice(void) const
|
||||
|
||||
const char **cDvbDevice::GetAudioTracksDevice(int *CurrentTrack) const
|
||||
{
|
||||
if (Ca())
|
||||
return NULL; // a Ca recording session blocks switching live audio tracks
|
||||
if (NumAudioTracks()) {
|
||||
if (NumAudioTracksDevice()) {
|
||||
if (CurrentTrack)
|
||||
*CurrentTrack = (pidHandles[ptAudio].pid == aPid1) ? 0 : 1;
|
||||
static const char *audioTracks1[] = { "Audio 1", NULL };
|
||||
static const char *audioTracks2[] = { "Audio 1", "Audio 2", NULL };
|
||||
return NumAudioTracks() > 1 ? audioTracks2 : audioTracks1;
|
||||
return NumAudioTracksDevice() > 1 ? audioTracks2 : audioTracks1;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void cDvbDevice::SetAudioTrackDevice(int Index)
|
||||
{
|
||||
if (0 <= Index && Index < NumAudioTracks()) {
|
||||
if (0 <= Index && Index < NumAudioTracksDevice()) {
|
||||
int vpid = pidHandles[ptVideo].pid; // need to turn video PID off/on to restart demux
|
||||
DelPid(vpid);
|
||||
DelPid(pidHandles[ptAudio].pid);
|
||||
|
Loading…
Reference in New Issue
Block a user