FS-7514: SQUASH ME

This commit is contained in:
Anthony Minessale 2014-11-21 17:35:42 -05:00 committed by Michael Jerris
parent 6402f3533c
commit 85d34e7ac9
1 changed files with 2 additions and 2 deletions

View File

@ -199,9 +199,9 @@ void vlc_play_audio_callback(void *data, const void *samples, unsigned count, in
switch_mutex_lock(context->audio_mutex);
bytes = switch_buffer_inuse(context->audio_buffer);
if ( bytes > (VLC_BUFFER_SIZE * 10)) {
if (bytes > 2000000) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Buffer overflow %d\n", (int)bytes);
switch_buffer_toss(context->audio_buffer, bytes - (VLC_BUFFER_SIZE * 10));
switch_buffer_zero(context->audio_buffer);
}
switch_buffer_write(context->audio_buffer, samples, count * 2 * context->channels);