summaryrefslogtreecommitdiff
path: root/dvbplayer.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-03-30 12:56:30 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2003-03-30 12:56:30 +0200
commit4200055fe51bc5432aa69ee334e2300c026b3a16 (patch)
tree14ef5045b06a909e05fc279cd80bd253f451f800 /dvbplayer.c
parentc52b219131eee937c16b3dd9ebc3706d77df689c (diff)
downloadvdr-4200055fe51bc5432aa69ee334e2300c026b3a16.tar.gz
vdr-4200055fe51bc5432aa69ee334e2300c026b3a16.tar.bz2
Replaced the 'for' loops in StripAudioPackets() with memset() calls
Diffstat (limited to 'dvbplayer.c')
-rw-r--r--dvbplayer.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/dvbplayer.c b/dvbplayer.c
index 5aff3511..f71c69cc 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.18 2003/02/15 10:38:59 kls Exp $
+ * $Id: dvbplayer.c 1.19 2003/03/30 12:51:51 kls Exp $
*/
#include "dvbplayer.h"
@@ -324,11 +324,8 @@ void cDvbPlayer::StripAudioPackets(uchar *b, int Length, uchar Except)
case 0xC0 ... 0xC1: // audio
if (c == 0xC1)
canToggleAudioTrack = true;
- if (!Except || c != Except) {
- int n = l;
- for (int j = i; j < Length && n--; j++)
- b[j] = 0x00;
- }
+ if (!Except || c != Except)
+ memset(&b[i], 0x00, min(l, Length-i));
break;
case 0xE0 ... 0xEF: // video
break;