FS-10152: [mod_shout] seek from eof to 0 not working in mod_shout #resolve
This commit is contained in:
parent
e61f6e227c
commit
9837aa936b
|
@ -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…
Reference in New Issue