]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add dynamic buffers
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 8 Sep 2006 19:00:40 +0000 (19:00 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 8 Sep 2006 19:00:40 +0000 (19:00 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2584 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_core.c

index f915fe100617664cd6da9c9276b4d4f4c67e3d1a..7418ad4cff02da938a2bb6e3e39f0871785a680f 100644 (file)
@@ -1559,11 +1559,14 @@ SWITCH_DECLARE(void) switch_core_session_reset(switch_core_session_t *session)
 {
        /* sweep theese under the rug, they wont be leaked they will be reclaimed
           when the session ends.
-        */
-       session->raw_write_buffer = NULL;
-       session->raw_read_buffer = NULL;
+       */
+
        session->read_resampler = NULL;
        session->write_resampler = NULL;
+
+       /* wipe theese, they will be recreated if need be */
+       switch_buffer_destroy(&(*session)->raw_read_buffer);
+       switch_buffer_destroy(&(*session)->raw_write_buffer);
 }
 
 SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_session_t *session, switch_frame_t *frame,