From 0381e78adcba755d4d0674cf176b798cee4e8aae Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 7 Mar 2014 12:48:53 +0100 Subject: Free data in input frame, not just the frame struct. --- src/lrtp.cc | 5 ++--- src/lrtp.h | 2 +- src/rtp_profile.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lrtp.cc b/src/lrtp.cc index 69b9efe..b627c95 100644 --- a/src/lrtp.cc +++ b/src/lrtp.cc @@ -41,8 +41,6 @@ #include "srtp.h" -#define SKIP_SRTP - #ifdef __cplusplus extern "C" { #endif @@ -152,7 +150,7 @@ void lrtp_destroy_profile(struct lrtp_t *lrtp, unsigned int csrc) EXPORT int lrtp_enqueue_frame(struct lrtp_t *lrtp, unsigned int csrc, - const char *data, size_t size, + char *data, size_t size, unsigned long int timestamp) { if(lrtp->profiles.find(csrc) == lrtp->profiles.end()) { @@ -252,6 +250,7 @@ int lrtp_pack(struct lrtp_t *lrtp, char *packet, size_t maxsize) profile->process_finished_ptr); } profile->framelist.pop_front(); + free(frame->data); delete frame; } diff --git a/src/lrtp.h b/src/lrtp.h index f790c59..dc40a91 100644 --- a/src/lrtp.h +++ b/src/lrtp.h @@ -89,7 +89,7 @@ typedef enum { */ EXPORT int lrtp_enqueue_frame(struct lrtp_t *lrtp, unsigned int csrc, - const char *framedate, size_t framesize, + char *framedate, size_t framesize, unsigned long int timestamp); /** diff --git a/src/rtp_profile.h b/src/rtp_profile.h index c38f824..bfb7572 100644 --- a/src/rtp_profile.h +++ b/src/rtp_profile.h @@ -36,7 +36,7 @@ struct lrtp_t; typedef struct { - const char *data; + char *data; size_t size; size_t offset; unsigned long int timestamp; -- cgit v1.2.3