mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Now starting the Dolby Digital output thread only if the recording actually contains Dolby Digital audio data
This commit is contained in:
parent
ac5aecb8eb
commit
cb90e9b8dc
@ -147,6 +147,8 @@ Werner Fink <werner@suse.de>
|
||||
for making I/O more robust by handling EINTR
|
||||
for fixing closing all unused file descriptors when opening a pipe
|
||||
for helping to debug leftover 'zombie' processes when closing a pipe
|
||||
for making the Dolby Digital thread start only if the recording actually
|
||||
contains Dolby Digital data
|
||||
|
||||
Rolf Hakenes <hakenes@hippomi.de>
|
||||
for providing 'libdtv' and adapting the EIT mechanisms to it
|
||||
|
2
HISTORY
2
HISTORY
@ -1086,3 +1086,5 @@ Video Disk Recorder Revision History
|
||||
- Fixed closing a pipe (used for replaying Dolby Digital audio), which
|
||||
sometimes left 'zombie' processes behind (thanks to Werner Fink for helping
|
||||
to debug this one).
|
||||
- Now starting the Dolby Digital output thread only if the recording actually
|
||||
contains Dolby Digital audio data (thanks to Werner Fink).
|
||||
|
14
dvbapi.c
14
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
|
||||
|
Loading…
Reference in New Issue
Block a user