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>
|
#include <vdr/channels.h>
|
||||||
@ -270,7 +270,7 @@ eOSState cMenuEditIpItem::ProcessKey(eKeys Key) {
|
|||||||
} else
|
} else
|
||||||
curNum = curNum * 10 + (Key - k0);
|
curNum = curNum * 10 + (Key - k0);
|
||||||
|
|
||||||
if (!step && (curNum * 10 > 255) || (curNum == 0)) {
|
if ((curNum * 10 > 255) || (curNum == 0)) {
|
||||||
in_addr addr;
|
in_addr addr;
|
||||||
addr.s_addr = inet_addr(value);
|
addr.s_addr = inet_addr(value);
|
||||||
if ((int)addr.s_addr == -1)
|
if ((int)addr.s_addr == -1)
|
||||||
|
@ -559,11 +559,12 @@ istream & operator >> (istream & stream, PS_Packet & x){
|
|||||||
p = stream.tellg();
|
p = stream.tellg();
|
||||||
while (!stream.eof() && !found && count < MAX_SEARCH) {
|
while (!stream.eof() && !found && count < MAX_SEARCH) {
|
||||||
stream.read((char *)&headr,4);
|
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 )
|
if ( headr[3] == 0xBA )
|
||||||
found = 1;
|
found = 1;
|
||||||
else if ( headr[3] == 0xB9 ) break;
|
else if ( headr[3] == 0xB9 ) break;
|
||||||
else stream.seekg(p+streampos(1));
|
else stream.seekg(p+streampos(1));
|
||||||
|
}
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -776,16 +777,16 @@ int tv_norm(istream &stream){
|
|||||||
while (!stream.eof() && !found) {
|
while (!stream.eof() && !found) {
|
||||||
p = stream.tellg();
|
p = stream.tellg();
|
||||||
stream.read((char *)headr,4);
|
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 ){
|
if ( headr[3] == 0xB5 ){
|
||||||
char *profile[] = {"reserved", "High", "Spatially Scalable",
|
const char *profile[] = {"reserved", "High", "Spatially Scalable",
|
||||||
"SNR Scalable", "Main", "Simple", "undef",
|
"SNR Scalable", "Main", "Simple", "undef",
|
||||||
"undef"};
|
"undef"};
|
||||||
char *level[] = {"res", "res", "res", "res",
|
const char *level[] = {"res", "res", "res", "res",
|
||||||
"High","res", "High 1440", "res",
|
"High","res", "High 1440", "res",
|
||||||
"Main","res", "Low", "res",
|
"Main","res", "Low", "res",
|
||||||
"res", "res", "res", "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;
|
mpeg = 2;
|
||||||
stream.read((char *)headr,4);
|
stream.read((char *)headr,4);
|
||||||
cerr << "PROFILE: " << profile[headr[0] & 0x7] << endl;
|
cerr << "PROFILE: " << profile[headr[0] & 0x7] << endl;
|
||||||
@ -796,6 +797,7 @@ int tv_norm(istream &stream){
|
|||||||
mpeg = 1;
|
mpeg = 1;
|
||||||
found = 1;
|
found = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (! found) stream.seekg(p+streampos(1));
|
if (! found) stream.seekg(p+streampos(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -831,7 +833,7 @@ int stream_type(istream &fin){
|
|||||||
}
|
}
|
||||||
|
|
||||||
fin >> pes;
|
fin >> pes;
|
||||||
fin.read((char *)!headr,4);
|
fin.read((char *)NULL,4);
|
||||||
fin.seekg(p);
|
fin.seekg(p);
|
||||||
if (fin && headr[0] == 0x00 && headr[1] == 0x00
|
if (fin && headr[0] == 0x00 && headr[1] == 0x00
|
||||||
&& headr[2] == 0x01 ){
|
&& headr[2] == 0x01 ){
|
||||||
@ -868,7 +870,7 @@ void analyze(istream &fin)
|
|||||||
PS_Packet ps;
|
PS_Packet ps;
|
||||||
PES_Packet pes;
|
PES_Packet pes;
|
||||||
int fc = 0;
|
int fc = 0;
|
||||||
char *frames[3] = {"I-Frame","P-Frame","B-Frame"};
|
const char *frames[3] = {"I-Frame","P-Frame","B-Frame"};
|
||||||
|
|
||||||
while(fin){
|
while(fin){
|
||||||
uint32_t pts;
|
uint32_t pts;
|
||||||
|
@ -489,7 +489,7 @@ int get_video_info(Remux *rem)
|
|||||||
VideoInfo *vi = &rem->video_info;
|
VideoInfo *vi = &rem->video_info;
|
||||||
|
|
||||||
while (found < 4 && ring_rest(vid_buffy)){
|
while (found < 4 && ring_rest(vid_buffy)){
|
||||||
uint8_t b[3];
|
uint8_t b[4];
|
||||||
|
|
||||||
vring_peek( rem, b, 4, 0);
|
vring_peek( rem, b, 4, 0);
|
||||||
if ( b[0] == 0x00 && b[1] == 0x00 && b[2] == 0x01
|
if ( b[0] == 0x00 && b[1] == 0x00 && b[2] == 0x01
|
||||||
|
Loading…
Reference in New Issue
Block a user