Revision
17105
Author
anthm
Date
2010-03-25 16:11:38 -0500 (Thu, 25 Mar 2010)

Log Message

FSCORE-579

Modified Paths

Diff

Modified: freeswitch/trunk/src/switch_core_codec.c (17104 => 17105)


--- freeswitch/trunk/src/switch_core_codec.c	2010-03-25 19:08:00 UTC (rev 17104)
+++ freeswitch/trunk/src/switch_core_codec.c	2010-03-25 21:11:38 UTC (rev 17105)
@@ -468,13 +468,16 @@
 		if ((status = switch_core_new_memory_pool(&new_codec->memory_pool)) != SWITCH_STATUS_SUCCESS) {
 			return status;
 		}
-		switch_set_flag(new_codec, SWITCH_CODEC_FLAG_FREE_POOL);
 	}
 
 	new_codec->codec_interface = codec->codec_interface;
 	new_codec->implementation = codec->implementation;
 	new_codec->flags = codec->flags;
 
+	if (!pool) {
+		switch_set_flag(new_codec, SWITCH_CODEC_FLAG_FREE_POOL);
+	}
+
 	if (codec->fmtp_in) {
 		new_codec->fmtp_in = switch_core_strdup(new_codec->memory_pool, codec->fmtp_in);
 	}