From e1e527d61f619832c82f293b9658820b7c5bbf59 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 4 Dec 2013 14:01:11 +0100 Subject: Fix wrong return value. Remove some printf's. --- src/lrtp.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/lrtp.cc') diff --git a/src/lrtp.cc b/src/lrtp.cc index f974331..9447032 100644 --- a/src/lrtp.cc +++ b/src/lrtp.cc @@ -39,7 +39,7 @@ #include "srtp.h" -//#define SKIP_SRTP +#define SKIP_SRTP #ifdef __cplusplus extern "C" { @@ -152,6 +152,8 @@ int lrtp_enqueue_frame(struct lrtp_profile_t *profile, frame->size = size; frame->offset = 0; + //printf("lrtp_enqueue_frame: frame->size: %d\n", frame->size); + profile->framelist.push_back(frame); return 0; @@ -248,6 +250,7 @@ int lrtp_dequeue_frame(struct lrtp_t *lrtp, return -1; // Buffer too small. } + size_t framesize = f->size; memcpy(frame, f->data, f->size); *csrc = f->csrc; @@ -255,10 +258,12 @@ int lrtp_dequeue_frame(struct lrtp_t *lrtp, lrtp->framelist.pop_front(); + //printf("%d frames left in framelist.\n", lrtp->framelist.size()); + free(f->data); delete f; - return f->size; + return framesize; } EXPORT -- cgit v1.2.3