AMF3 support, RTMP werkendheid?
This commit is contained in:
parent
4608d55d34
commit
06e0aa40ab
1 changed files with 2 additions and 2 deletions
|
@ -606,7 +606,7 @@ AMF::Object3 AMF::parseOne3(const unsigned char *& data, unsigned int &len, unsi
|
||||||
unsigned int arrsize = 0;
|
unsigned int arrsize = 0;
|
||||||
unsigned char tmpdbl[8];
|
unsigned char tmpdbl[8];
|
||||||
#if DEBUG >= 10
|
#if DEBUG >= 10
|
||||||
fprintf(stderr, "Note: AMF type %hhx found. %i bytes left\n", data[i], len-i);
|
fprintf(stderr, "Note: AMF3 type %hhx found. %i bytes left\n", data[i], len-i);
|
||||||
#endif
|
#endif
|
||||||
switch (data[i]){
|
switch (data[i]){
|
||||||
case AMF::AMF3_UNDEFINED:
|
case AMF::AMF3_UNDEFINED:
|
||||||
|
@ -759,11 +759,11 @@ AMF::Object3 AMF::parseOne3(const unsigned char *& data, unsigned int &len, unsi
|
||||||
}else{
|
}else{
|
||||||
tmpi = (tmpi | (data[i+3] & 0x7F)) << 8;//strip the upper bit, shift 7 up.
|
tmpi = (tmpi | (data[i+3] & 0x7F)) << 8;//strip the upper bit, shift 7 up.
|
||||||
tmpi |= data[i+4];
|
tmpi |= data[i+4];
|
||||||
|
tmpi = (tmpi << 3) >> 3;//fix sign bit
|
||||||
i+=5;
|
i+=5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tmpi = (tmpi << 3) >> 3;//fix sign bit
|
|
||||||
if ((tmpi & 1) == 0){
|
if ((tmpi & 1) == 0){
|
||||||
return AMF::Object3(name, (int)((tmpi >> 1) + 1), AMF::AMF3_BYTES);//reference type
|
return AMF::Object3(name, (int)((tmpi >> 1) + 1), AMF::AMF3_BYTES);//reference type
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue