summaryrefslogtreecommitdiff
path: root/dvbapi.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-03-09 12:09:57 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-03-09 12:09:57 +0100
commitcb90e9b8dc05164c5a3f1b4550003a2a55409144 (patch)
treee3a60c941400b7f5f9efedc649e6937342202186 /dvbapi.c
parentac5aecb8eb6d6979877dbf9db813eb8d6b1a6ae6 (diff)
downloadvdr-cb90e9b8dc05164c5a3f1b4550003a2a55409144.tar.gz
vdr-cb90e9b8dc05164c5a3f1b4550003a2a55409144.tar.bz2
Now starting the Dolby Digital output thread only if the recording actually contains Dolby Digital audio data
Diffstat (limited to 'dvbapi.c')
-rw-r--r--dvbapi.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/dvbapi.c b/dvbapi.c
index dd009369..a0bcb1bd 100644
--- a/dvbapi.c
+++ b/dvbapi.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbapi.c 1.159 2002/03/09 10:14:07 kls Exp $
+ * $Id: dvbapi.c 1.160 2002/03/09 11:59:39 kls Exp $
*/
#include "dvbapi.h"
@@ -746,10 +746,6 @@ cPlayBuffer::cPlayBuffer(cDvbApi *DvbApi, int VideoDev, int AudioDev)
canToggleAudioTrack = false;
skipAC3bytes = false;
audioTrack = 0xC0;
- if (cDvbApi::AudioCommand()) {
- if (!dolbyDev.Open(cDvbApi::AudioCommand(), "w"))
- esyslog(LOG_ERR, "ERROR: can't open pipe to audio command '%s'", cDvbApi::AudioCommand());
- }
}
cPlayBuffer::~cPlayBuffer()
@@ -758,7 +754,11 @@ cPlayBuffer::~cPlayBuffer()
void cPlayBuffer::PlayExternalDolby(const uchar *b, int MaxLength)
{
- if (dolbyDev) {
+ if (cDvbApi::AudioCommand()) {
+ if (!dolbyDev && !dolbyDev.Open(cDvbApi::AudioCommand(), "w")) {
+ esyslog(LOG_ERR, "ERROR: can't open pipe to audio command '%s'", cDvbApi::AudioCommand());
+ return;
+ }
if (b[0] == 0x00 && b[1] == 0x00 && b[2] == 0x01) {
if (b[3] == 0xBD) { // dolby
int l = b[4] * 256 + b[5] + 6;
@@ -1150,7 +1150,7 @@ void cReplayBuffer::StripAudioPackets(uchar *b, int Length, uchar Except)
int l = b[i + 4] * 256 + b[i + 5] + 6;
switch (c) {
case 0xBD: // dolby
- if (Except && dolbyDev)
+ if (Except)
PlayExternalDolby(&b[i], Length - i);
// continue with deleting the data - otherwise it disturbs DVB replay
case 0xC0 ... 0xC1: // audio