From 2d6f2a86472c282876062fb9e28e8bcc44f5b4b7 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Mon, 8 Nov 2010 20:56:14 +0100 Subject: [PATCH] Tag lengths... --- util/flv_sock.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/flv_sock.cpp b/util/flv_sock.cpp index f9bd4b05..81a1cf74 100644 --- a/util/flv_sock.cpp +++ b/util/flv_sock.cpp @@ -96,9 +96,10 @@ bool FLV_GetPacket(FLV_Pack *& p, int sock){ //calculate keyframeness, next time read header again, return true p->isKeyframe = false; 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-3] << 16); + testlen += (p->data[p->len-4] << 24); fprintf(stderr, "Len: %i, testlen: %i\n", p->len, testlen); done = true; sofar = 0;