FS-9704 #resolve [Seeking video files with mod_av after it reaches the end does not work]

This commit is contained in:
Anthony Minessale 2016-11-07 12:14:25 -06:00
parent 732b6e75fe
commit 8a80741507
1 changed files with 9 additions and 0 deletions

View File

@ -2075,6 +2075,15 @@ static switch_status_t av_file_seek(switch_file_handle_t *handle, unsigned int *
context->seek_ts = samples / handle->native_rate * AV_TIME_BASE;
*cur_sample = context->seek_ts;
if (!context->file_read_thread_running) {
switch_threadattr_t *thd_attr = NULL;
switch_threadattr_create(&thd_attr, handle->memory_pool);
switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
switch_thread_create(&context->file_read_thread, thd_attr, file_read_thread_run, context, handle->memory_pool);
}
return SWITCH_STATUS_FALSE;
}