summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-12-04 14:01:11 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2013-12-04 14:01:11 +0100
commite1e527d61f619832c82f293b9658820b7c5bbf59 (patch)
tree046f7c3e92e116795aefbbc0d0f6dc96d68899da
parent972274aa39e3e978f4a9a8e870b1e3dedfa4b188 (diff)
Fix wrong return value. Remove some printf's.
-rw-r--r--src/lrtp.cc9
1 files changed, 7 insertions, 2 deletions
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