mirror of
https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
synced 2023-10-10 19:16:51 +02:00
fixes for some new warnings from gcc 4.3.0
- array subscript is above array bounds (real bug - might overwrite other var) - deprecated conversion from string constant to 'char*' - suggest explicit braces to avoid ambiguous 'else' Thanks to Petri Hintukainen (#354) Modified Files: common.c libdvbmpeg/cpptools.cc libdvbmpeg/remux.c
This commit is contained in:
parent
17ff4d32e8
commit
d0385f5252
4
common.c
4
common.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: common.c,v 1.4 2005/02/11 16:44:14 lordjaxom Exp $
|
||||
* $Id: common.c,v 1.5 2007/09/21 11:55:56 schmirl Exp $
|
||||
*/
|
||||
|
||||
#include <vdr/channels.h>
|
||||
@ -270,7 +270,7 @@ eOSState cMenuEditIpItem::ProcessKey(eKeys Key) {
|
||||
} else
|
||||
curNum = curNum * 10 + (Key - k0);
|
||||
|
||||
if (!step && (curNum * 10 > 255) || (curNum == 0)) {
|
||||
if ((curNum * 10 > 255) || (curNum == 0)) {
|
||||
in_addr addr;
|
||||
addr.s_addr = inet_addr(value);
|
||||
if ((int)addr.s_addr == -1)
|
||||
|
@ -559,11 +559,12 @@ istream & operator >> (istream & stream, PS_Packet & x){
|
||||
p = stream.tellg();
|
||||
while (!stream.eof() && !found && count < MAX_SEARCH) {
|
||||
stream.read((char *)&headr,4);
|
||||
if (headr[0] == 0x00 && headr[1] == 0x00 && headr[2] == 0x01)
|
||||
if (headr[0] == 0x00 && headr[1] == 0x00 && headr[2] == 0x01) {
|
||||
if ( headr[3] == 0xBA )
|
||||
found = 1;
|
||||
else if ( headr[3] == 0xB9 ) break;
|
||||
else stream.seekg(p+streampos(1));
|
||||
}
|
||||
count++;
|
||||
}
|
||||
|
||||
@ -776,16 +777,16 @@ int tv_norm(istream &stream){
|
||||
while (!stream.eof() && !found) {
|
||||
p = stream.tellg();
|
||||
stream.read((char *)headr,4);
|
||||
if (headr[0] == 0x00 && headr[1] == 0x00 && headr[2] == 0x01)
|
||||
if (headr[0] == 0x00 && headr[1] == 0x00 && headr[2] == 0x01) {
|
||||
if ( headr[3] == 0xB5 ){
|
||||
char *profile[] = {"reserved", "High", "Spatially Scalable",
|
||||
const char *profile[] = {"reserved", "High", "Spatially Scalable",
|
||||
"SNR Scalable", "Main", "Simple", "undef",
|
||||
"undef"};
|
||||
char *level[] = {"res", "res", "res", "res",
|
||||
const char *level[] = {"res", "res", "res", "res",
|
||||
"High","res", "High 1440", "res",
|
||||
"Main","res", "Low", "res",
|
||||
"res", "res", "res", "res"};
|
||||
char *chroma[] = {"res", "4:2:0", "4:2:2", "4:4:4:"};
|
||||
const char *chroma[] = {"res", "4:2:0", "4:2:2", "4:4:4:"};
|
||||
mpeg = 2;
|
||||
stream.read((char *)headr,4);
|
||||
cerr << "PROFILE: " << profile[headr[0] & 0x7] << endl;
|
||||
@ -795,7 +796,8 @@ int tv_norm(istream &stream){
|
||||
} else {
|
||||
mpeg = 1;
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (! found) stream.seekg(p+streampos(1));
|
||||
}
|
||||
|
||||
@ -831,7 +833,7 @@ int stream_type(istream &fin){
|
||||
}
|
||||
|
||||
fin >> pes;
|
||||
fin.read((char *)!headr,4);
|
||||
fin.read((char *)NULL,4);
|
||||
fin.seekg(p);
|
||||
if (fin && headr[0] == 0x00 && headr[1] == 0x00
|
||||
&& headr[2] == 0x01 ){
|
||||
@ -868,7 +870,7 @@ void analyze(istream &fin)
|
||||
PS_Packet ps;
|
||||
PES_Packet pes;
|
||||
int fc = 0;
|
||||
char *frames[3] = {"I-Frame","P-Frame","B-Frame"};
|
||||
const char *frames[3] = {"I-Frame","P-Frame","B-Frame"};
|
||||
|
||||
while(fin){
|
||||
uint32_t pts;
|
||||
|
@ -489,7 +489,7 @@ int get_video_info(Remux *rem)
|
||||
VideoInfo *vi = &rem->video_info;
|
||||
|
||||
while (found < 4 && ring_rest(vid_buffy)){
|
||||
uint8_t b[3];
|
||||
uint8_t b[4];
|
||||
|
||||
vring_peek( rem, b, 4, 0);
|
||||
if ( b[0] == 0x00 && b[1] == 0x00 && b[2] == 0x01
|
||||
|
Loading…
Reference in New Issue
Block a user