mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-12 15:21:50 +00:00
tweaks to codec buffer size detection
This commit is contained in:
@@ -438,7 +438,11 @@ static inline void switch_core_codec_add_implementation(switch_memory_pool_t *po
|
||||
/*! deinitalize a codec handle using this implementation */
|
||||
switch_core_codec_destroy_func_t destroy)
|
||||
{
|
||||
if (codec_type == SWITCH_CODEC_TYPE_VIDEO || switch_check_interval(actual_samples_per_second, microseconds_per_packet / 1000)) {
|
||||
|
||||
if (decoded_bytes_per_packet > SWITCH_RECOMMENDED_BUFFER_SIZE) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Rejected codec name: %s rate: %u ptime: %u not enough buffer space %d > %d\n",
|
||||
iananame, actual_samples_per_second, microseconds_per_packet / 1000, decoded_bytes_per_packet, SWITCH_RECOMMENDED_BUFFER_SIZE);
|
||||
} else if (codec_type == SWITCH_CODEC_TYPE_VIDEO || switch_check_interval(actual_samples_per_second, microseconds_per_packet / 1000)) {
|
||||
switch_codec_implementation_t *impl = (switch_codec_implementation_t *) switch_core_alloc(pool, sizeof(*impl));
|
||||
impl->codec_type = codec_type;
|
||||
impl->ianacode = ianacode;
|
||||
|
||||
Reference in New Issue
Block a user