reset codecs after media bugs

This commit is contained in:
Anthony Minessale
2010-05-04 16:03:15 -05:00
committed by Brian West
parent ba46088e68
commit 27fc3518bd
5 changed files with 69 additions and 3 deletions

View File

@@ -455,6 +455,17 @@ SWITCH_DECLARE(switch_codec_t *) switch_core_session_get_video_write_codec(switc
}
SWITCH_DECLARE(switch_status_t) switch_core_codec_reset(switch_codec_t *codec)
{
switch_assert(codec != NULL);
codec->implementation->destroy(codec);
codec->implementation->init(codec, codec->flags, NULL);
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status_t) switch_core_codec_copy(switch_codec_t *codec, switch_codec_t *new_codec, switch_memory_pool_t *pool)
{
switch_status_t status;