summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY2
-rw-r--r--dvbplayer.c9
-rw-r--r--transfer.c9
4 files changed, 9 insertions, 12 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index b563f9c7..523af25b 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -220,6 +220,7 @@ Werner Fink <werner@suse.de>
under heavy load
for improving keyboard detection
for adding some missing cAudio handling calls
+ for replacing the 'for' loops in StripAudioPackets() with memset() calls
Rolf Hakenes <hakenes@hippomi.de>
for providing 'libdtv' and adapting the EIT mechanisms to it
diff --git a/HISTORY b/HISTORY
index b95c5147..8198bfb5 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2004,3 +2004,5 @@ Video Disk Recorder Revision History
helping to fix it).
- Modified LOF handling to allow for C-band reception (thanks to Malcolm Caldwell).
- Added some missing cAudio handling calls (thanks to Werner Fink).
+- Replaced the 'for' loops in StripAudioPackets() with memset() calls (thanks to
+ Werner Fink).
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;
diff --git a/transfer.c b/transfer.c
index 4e8c3031..9354e58f 100644
--- a/transfer.c
+++ b/transfer.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: transfer.c 1.10 2003/02/15 14:12:41 kls Exp $
+ * $Id: transfer.c 1.11 2003/03/30 12:52:11 kls Exp $
*/
#include "transfer.h"
@@ -133,11 +133,8 @@ void cTransfer::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;