summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-01-01 15:06:02 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-01-01 15:06:02 +0100
commitf50844d73387dccec2cf83e17b1b5bce825a8455 (patch)
tree8c959f47040da730a0ea10a24f842596f5bbca27
parentdbc2abadd8e604d5f4009a11d823df43c0a6a621 (diff)
downloadvdr-f50844d73387dccec2cf83e17b1b5bce825a8455.tar.gz
vdr-f50844d73387dccec2cf83e17b1b5bce825a8455.tar.bz2
Fixed incrementing the 'state' variables in the repacker classes in remux.c to avoid warnings with g++ 4.1.0
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY2
-rw-r--r--remux.c29
3 files changed, 20 insertions, 13 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 23cffcdc..4d912704 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1448,6 +1448,8 @@ Ville Skyttä <ville.skytta@iki.fi>
for reporting that the default value for "Setup/EPG bugfix level" was wrong
for fixing initializing pthread_mutexattr_t and pthread_rwlockattr_t to avoid
warnings with g++ 4.1.0
+ for reporting warnings with g++ 4.1.0 regarding incrementing the 'state' variables
+ in the repacker classes in remux.c
Steffen Beyer <cpunk@reactor.de>
for fixing setting the colored button help after deleting a recording in case the next
diff --git a/HISTORY b/HISTORY
index edf19fb8..8cd2f178 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4060,3 +4060,5 @@ Video Disk Recorder Revision History
- Made the static cControl functions thread safe (thanks to Patrick Fischer).
- Fixed initializing pthread_mutexattr_t and pthread_rwlockattr_t to avoid
warnings with g++ 4.1.0 (thanks to Ville Skyttä).
+- Fixed incrementing the 'state' variables in the repacker classes in remux.c
+ to avoid warnings with g++ 4.1.0 (reported by Ville Skyttä).
diff --git a/remux.c b/remux.c
index 31abb69d..426ee7ab 100644
--- a/remux.c
+++ b/remux.c
@@ -11,7 +11,7 @@
* The cRepacker family's code was originally written by Reinhard Nissl <rnissl@gmx.de>,
* and adapted to the VDR coding style by Klaus.Schmidinger@cadsoft.de.
*
- * $Id: remux.c 1.50 2005/12/04 13:56:50 kls Exp $
+ * $Id: remux.c 1.51 2006/01/01 14:58:53 kls Exp $
*/
#include "remux.h"
@@ -246,7 +246,8 @@ private:
syncing,
findPicture,
scanPicture
- } state;
+ };
+ int state;
public:
cVideoRepacker(void);
virtual void Reset(void);
@@ -380,13 +381,13 @@ void cVideoRepacker::Repack(cRingBufferLinear *ResultBuffer, const uchar *Data,
// maximum we can hold in one PES packet
packetTodo = maxPacketSize - pesHeaderLen;
// go on with finding the picture data
- ((int &)state)++;
+ state++;
}
break;
case 0x01 ... 0xAF: // slice start codes
if (state == findPicture) {
// go on with scanning the picture data
- ((int &)state)++;
+ state++;
}
break;
}
@@ -547,7 +548,8 @@ private:
enum eState {
syncing,
scanFrame
- } state;
+ };
+ int state;
int frameTodo;
int frameSize;
int cid;
@@ -747,7 +749,7 @@ void cAudioRepacker::Repack(cRingBufferLinear *ResultBuffer, const uchar *Data,
// expected remainder of audio frame: so far we have read 3 bytes from the frame header
frameTodo = frameSize - 3;
// go on with collecting the frame's data
- ((int &)state)++;
+ state++;
}
}
}
@@ -928,14 +930,15 @@ private:
uchar chk1;
uchar chk2;
int ac3todo;
- enum {
+ enum eState {
find_0b,
find_77,
store_chk1,
store_chk2,
get_length,
output_packet
- } state;
+ };
+ int state;
int skippedBytes;
void ResetPesHeader(bool ContinuationFrame = false);
void AppendSubStreamID(bool ContinuationFrame = false);
@@ -1120,7 +1123,7 @@ void cDolbyRepacker::Repack(cRingBufferLinear *ResultBuffer, const uchar *Data,
switch (state) {
case find_0b:
if (*data == 0x0B) {
- ++(int &)state;
+ state++;
// copy header information once for later use
if (pesHeaderBackupLen > 0) {
pesHeaderLen = pesHeaderBackupLen;
@@ -1143,21 +1146,21 @@ void cDolbyRepacker::Repack(cRingBufferLinear *ResultBuffer, const uchar *Data,
done++;
todo--;
skippedBytes++; // collect number of skipped bytes while syncing
- ++(int &)state;
+ state++;
continue;
case store_chk1:
chk1 = *data++;
done++;
todo--;
skippedBytes++; // collect number of skipped bytes while syncing
- ++(int &)state;
+ state++;
continue;
case store_chk2:
chk2 = *data++;
done++;
todo--;
skippedBytes++; // collect number of skipped bytes while syncing
- ++(int &)state;
+ state++;
continue;
case get_length:
ac3todo = 2 * frameSizes[*data];
@@ -1195,7 +1198,7 @@ void cDolbyRepacker::Repack(cRingBufferLinear *ResultBuffer, const uchar *Data,
pesHeader[pesHeaderLen++] = chk1;
pesHeader[pesHeaderLen++] = chk2;
ac3todo -= 4;
- ++(int &)state;
+ state++;
// fall through to output
case output_packet: {
int bite = 0;