summaryrefslogtreecommitdiff
path: root/dvbplayer.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-05-24 08:48:49 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2003-05-24 08:48:49 +0200
commit24bbaa277c546857176ff1485f67f6185d4fbedb (patch)
tree239cfd7430545b575f8108887aff9c8e210c920a /dvbplayer.c
parenta28e2ef5b573d449d7331921f15f81b6b78dfa8e (diff)
downloadvdr-24bbaa277c546857176ff1485f67f6185d4fbedb.tar.gz
vdr-24bbaa277c546857176ff1485f67f6185d4fbedb.tar.bz2
Modified handling of audio packets in cDvbPlayer for better sync with external AC3 replay
Diffstat (limited to 'dvbplayer.c')
-rw-r--r--dvbplayer.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/dvbplayer.c b/dvbplayer.c
index afd42789..7224a8ab 100644
--- a/dvbplayer.c
+++ b/dvbplayer.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbplayer.c 1.20 2003/04/27 09:55:53 kls Exp $
+ * $Id: dvbplayer.c 1.21 2003/05/19 15:23:19 kls Exp $
*/
#include "dvbplayer.h"
@@ -477,8 +477,8 @@ void cDvbPlayer::Action(void)
}
int r = nonBlockingFileReader->Read(replayFile, b, Length);
if (r > 0) {
- if (AudioTrack >= 0)
- StripAudioPackets(b, r, AudioTrack);
+ if (AudioTrack == 0)
+ StripAudioPackets(b, r);
readFrame = new cFrame(b, -r, ftUnknown, readIndex); // hands over b to the ringBuffer
b = NULL;
}
@@ -514,9 +514,13 @@ void cDvbPlayer::Action(void)
if (!p) {
p = playFrame->Data();
pc = playFrame->Count();
- if (firstPacket) {
- cRemux::SetBrokenLink(p, pc);
- firstPacket = false;
+ if (p) {
+ if (firstPacket) {
+ cRemux::SetBrokenLink(p, pc);
+ firstPacket = false;
+ }
+ if (AudioTrack > 0)
+ StripAudioPackets(p, pc, AudioTrack);
}
}
if (p) {