diff options
Diffstat (limited to 'dvbplayer.c')
-rw-r--r-- | dvbplayer.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/dvbplayer.c b/dvbplayer.c index afd4278..6b7fe07 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.22 2003/05/24 09:04:26 kls Exp $ */ #include "dvbplayer.h" @@ -114,6 +114,7 @@ void cNonBlockingFileReader::Clear(void) { cMutexLock MutexLock(&mutex); f = -1; + free(buffer); buffer = NULL; wanted = length = 0; hasData = false; @@ -477,8 +478,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 +515,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) { |