]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7514: SQUASH ME
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 21 Nov 2014 22:35:42 +0000 (17:35 -0500)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:46:47 +0000 (12:46 -0500)
src/mod/formats/mod_vlc/mod_vlc.c

index d6b737e3559b40f06d9a7dbcb45f73010b8ff740..e5a24cc66d42da678e395db69faf8ca61db4f2f4 100644 (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);