summaryrefslogtreecommitdiff
path: root/dvbapi.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-11-25 16:44:13 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2001-11-25 16:44:13 +0100
commit1d9eb9f7bcc73fdcdc74d472e483779882e94f4c (patch)
treeb5cf8e8ede95b3694e6efce65456ed1472e3cc88 /dvbapi.c
parent6e6eeab1fdec4c628a624099e5d5e475ff46b619 (diff)
downloadvdr-1d9eb9f7bcc73fdcdc74d472e483779882e94f4c.tar.gz
vdr-1d9eb9f7bcc73fdcdc74d472e483779882e94f4c.tar.bz2
Fixed external AC3 replay; switched back to old version numbering scheme0.9.9pre1
Diffstat (limited to 'dvbapi.c')
-rw-r--r--dvbapi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/dvbapi.c b/dvbapi.c
index 5ec3d03d..707db0d9 100644
--- a/dvbapi.c
+++ b/dvbapi.c
@@ -7,7 +7,7 @@
* DVD support initially written by Andreas Schultz <aschultz@warp10.net>
* based on dvdplayer-0.5 by Matjaz Thaler <matjaz.thaler@guest.arnes.si>
*
- * $Id: dvbapi.c 1.140 2001/11/24 14:45:58 kls Exp $
+ * $Id: dvbapi.c 1.141 2001/11/25 16:38:09 kls Exp $
*/
//#define DVDDEBUG 1
@@ -710,6 +710,7 @@ protected:
int readIndex, writeIndex;
bool canDoTrickMode;
bool canToggleAudioTrack;
+ bool skipAC3bytes;
uchar audioTrack;
void TrickSpeed(int Increment);
virtual void Empty(bool Block = false);
@@ -752,6 +753,7 @@ cPlayBuffer::cPlayBuffer(cDvbApi *DvbApi, int VideoDev, int AudioDev)
readIndex = writeIndex = -1;
canDoTrickMode = false;
canToggleAudioTrack = false;
+ skipAC3bytes = false;
audioTrack = 0xC0;
if (cDvbApi::AudioCommand()) {
if (!dolbyDev.Open(cDvbApi::AudioCommand(), "w"))
@@ -769,7 +771,7 @@ void cPlayBuffer::PlayExternalDolby(const uchar *b, int MaxLength)
if (b[0] == 0x00 && b[1] == 0x00 && b[2] == 0x01) {
if (b[3] == 0xBD) { // dolby
int l = b[4] * 256 + b[5] + 6;
- int written = b[8] + 9; // skips the PES header
+ int written = b[8] + (skipAC3bytes ? 13 : 9); // skips the PES header
int n = min(l - written, MaxLength);
while (n > 0) {
int w = fwrite(&b[written], 1, n, dolbyDev);
@@ -1545,6 +1547,7 @@ cDVDplayBuffer::cDVDplayBuffer(cDvbApi *DvbApi, int VideoDev, int AudioDev, cDVD
canToggleAudioTrack = true;//XXX determine from cDVD!
data = new uchar[1024 * DVD_VIDEO_LB_LEN];
canDoTrickMode = true;
+ skipAC3bytes = true;
dvbApi->SetModeReplay();
Start();
}