summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-06-16 09:43:03 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2001-06-16 09:43:03 +0200
commit7caf38b527270f02960300a4eb13e44b7431c191 (patch)
tree966503f3e5ae4c2e23126fddab3281a46bf17d50
parentd17452dcfa08e92955d2def34f24a10fbffd08b1 (diff)
downloadvdr-7caf38b527270f02960300a4eb13e44b7431c191.tar.gz
vdr-7caf38b527270f02960300a4eb13e44b7431c191.tar.bz2
Bugfix in stripping audio packets
-rw-r--r--dvbapi.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/dvbapi.c b/dvbapi.c
index 7d2efa66..e5fcf88a 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.74 2001/06/15 14:11:21 kls Exp $
+ * $Id: dvbapi.c 1.75 2001/06/16 09:43:03 kls Exp $
*/
#include "dvbapi.h"
@@ -797,13 +797,16 @@ void cReplayBuffer::StripAudioPackets(uchar *b, int Length, uchar Except)
uchar c = b[i + 3];
switch (c) {
case 0xC0 ... 0xDF: // audio
- if (c == 0xC1)
- canToggleAudioTrack = true;
- if (!Except || c != Except) {
- int n = b[i + 4] * 256 + b[i + 5];
- for (int j = i; j < Length && n--; j++)
- b[j] = 0x00;
- }
+ {
+ int n = b[i + 4] * 256 + b[i + 5];
+ if (c == 0xC1)
+ canToggleAudioTrack = true;
+ if (!Except || c != Except) {
+ for (int j = i; j < Length && n--; j++)
+ b[j] = 0x00;
+ }
+ i += n;
+ }
break;
case 0xE0 ... 0xEF: // video
i += b[i + 4] * 256 + b[i + 5];