Tag lengths...

This commit is contained in:
Thulinma 2010-11-08 20:56:14 +01:00
parent 26dda89794
commit 2d6f2a8647

View file

@ -96,9 +96,10 @@ bool FLV_GetPacket(FLV_Pack *& p, int sock){
//calculate keyframeness, next time read header again, return true //calculate keyframeness, next time read header again, return true
p->isKeyframe = false; p->isKeyframe = false;
if ((p->data[0] == 0x09) && (((p->data[11] & 0xf0) >> 4) == 1)){p->isKeyframe = true;} if ((p->data[0] == 0x09) && (((p->data[11] & 0xf0) >> 4) == 1)){p->isKeyframe = true;}
int testlen = p->data[p->len-1] + 15; int testlen = p->data[p->len-1] + 3;
testlen += (p->data[p->len-2] << 8); testlen += (p->data[p->len-2] << 8);
testlen += (p->data[p->len-3] << 16); testlen += (p->data[p->len-3] << 16);
testlen += (p->data[p->len-4] << 24);
fprintf(stderr, "Len: %i, testlen: %i\n", p->len, testlen); fprintf(stderr, "Len: %i, testlen: %i\n", p->len, testlen);
done = true; done = true;
sofar = 0; sofar = 0;