]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9328 #resolve [switch_jb_peek_frame uses wrong len]
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 6 Jul 2016 18:19:46 +0000 (13:19 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 6 Jul 2016 18:19:46 +0000 (13:19 -0500)
src/switch_jitterbuffer.c

index 4bfca888215b3d56f9c750f1b8af33388ca54848..427498a5d2d435265b899a99852a3bb53abdc4e2 100644 (file)
@@ -902,10 +902,10 @@ SWITCH_DECLARE(switch_status_t) switch_jb_peek_frame(switch_jb_t *jb, uint32_t t
                frame->seq = ntohs(node->packet.header.seq);
                frame->timestamp = ntohl(node->packet.header.ts);
                frame->m = node->packet.header.m;
-               frame->datalen = node->len;
+               frame->datalen = node->len - 12;
 
-               if (frame->data && frame->buflen > node->len) {
-                       memcpy(frame->data, node->packet.body, node->len);
+               if (frame->data && frame->buflen > node->len - 12) {
+                       memcpy(frame->data, node->packet.body, node->len - 12);
                }
                return SWITCH_STATUS_SUCCESS;
        }