diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-12-04 14:03:31 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-12-04 14:03:31 +0100 |
commit | 69ed1b39d8ee855e9fe4c7b0ea0cffea951c1d59 (patch) | |
tree | dfb19672d069cc495759b146c21de7bcc1c1e49a /src | |
parent | 4c3faee9aded6e88af902cef33c3bd43f3475c35 (diff) |
Remove obsolete cahce mechanism.
Diffstat (limited to 'src')
-rw-r--r-- | src/rtp_profile_raw.cc | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/rtp_profile_raw.cc b/src/rtp_profile_raw.cc index cf34186..2b27501 100644 --- a/src/rtp_profile_raw.cc +++ b/src/rtp_profile_raw.cc @@ -36,10 +36,6 @@ struct lrtp_profile_raw_t { struct lrtp_profile_t profile; // 'Inherit' lrtp_profile_t unsigned short int pkg_size; - - // Cache - char *pkg_cache; - int pkg_cache_size; }; int profile_raw_pack(struct lrtp_profile_t *profile, @@ -48,19 +44,11 @@ int profile_raw_pack(struct lrtp_profile_t *profile, { struct lrtp_profile_raw_t *p = (struct lrtp_profile_raw_t *)profile; - size_t cpsz = p->pkg_size - p->pkg_cache_size; + size_t cpsz = p->pkg_size; if(cpsz > framesize) cpsz = framesize; - if(cpsz != 0) { - memcpy(p->pkg_cache, frame, cpsz); - p->pkg_cache_size += cpsz; - } - - if(p->pkg_cache_size == p->pkg_size) { - rtp.setPayload(p->pkg_cache, p->pkg_cache_size); - p->pkg_cache_size = 0; - } + rtp.setPayload(frame, cpsz); return cpsz; } @@ -85,7 +73,6 @@ int profile_raw_unpack(struct lrtp_profile_t *profile, void profile_raw_destroy(struct lrtp_profile_t *profile) { struct lrtp_profile_raw_t *p = (struct lrtp_profile_raw_t *)profile; - delete p->pkg_cache; delete p; } @@ -115,9 +102,6 @@ struct lrtp_profile_t *profile_raw_create(struct lrtp_t *lrtp, } } - p->pkg_cache = new char[p->pkg_size]; - p->pkg_cache_size = 0; - return &p->profile; } |