mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-04 17:51:03 +00:00
FS-10152: [mod_shout] seek from eof to 0 not working in mod_shout #resolve
This commit is contained in:
parent
1c0a6725ac
commit
f19fcdb4f0
@ -935,10 +935,14 @@ static switch_status_t shout_file_seek(switch_file_handle_t *handle, unsigned in
|
||||
samples -= switch_buffer_inuse(context->audio_buffer) / sizeof(int16_t);
|
||||
}
|
||||
|
||||
switch_mutex_lock(context->audio_mutex);
|
||||
switch_buffer_zero(context->audio_buffer);
|
||||
switch_mutex_unlock(context->audio_mutex);
|
||||
|
||||
seek_samples = mpg123_seek(context->mh, (off_t) samples, whence);
|
||||
|
||||
if (seek_samples >= 0) {
|
||||
context->eof = 0;
|
||||
handle->pos = *cur_sample = seek_samples;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user