From: Chris Rienzo Date: Thu, 8 May 2014 16:03:28 +0000 (-0400) Subject: CID: 1211943 mod_rayo - removed dead code when changing output speed X-Git-Tag: v1.5.12~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=17848d26be105c01f2b06febe0349d9b3ce09095;p=thirdparty%2Ffreeswitch.git CID: 1211943 mod_rayo - removed dead code when changing output speed --- diff --git a/src/mod/event_handlers/mod_rayo/rayo_output_component.c b/src/mod/event_handlers/mod_rayo/rayo_output_component.c index 4f32bbec10..9a19b1753e 100644 --- a/src/mod/event_handlers/mod_rayo/rayo_output_component.c +++ b/src/mod/event_handlers/mod_rayo/rayo_output_component.c @@ -819,7 +819,6 @@ static switch_status_t fileman_file_read(switch_file_handle_t *handle, void *dat for (;;) { int do_speed = 1; - int last_speed = -1; size_t read_bytes = 0; if (switch_test_flag(handle, SWITCH_FILE_PAUSE)) { @@ -912,11 +911,6 @@ static switch_status_t fileman_file_read(switch_file_handle_t *handle, void *dat handle->speed = -2; } - if (fh->audio_buffer && last_speed > -1 && last_speed != handle->speed) { - /* speed has changed, flush the buffer */ - switch_buffer_zero(fh->sp_audio_buffer); - } - if (switch_test_flag(fh, SWITCH_FILE_SEEK)) { /* file position has changed flush the buffer */ switch_buffer_zero(fh->audio_buffer); @@ -964,7 +958,6 @@ static switch_status_t fileman_file_read(switch_file_handle_t *handle, void *dat switch_buffer_write(fh->sp_audio_buffer, bp, r_len * 2); wrote_len += r_len; } - last_speed = handle->speed; continue; }