FS-9704 #resolve [Seeking video files with mod_av after it reaches the end does not work]
This commit is contained in:
parent
732b6e75fe
commit
8a80741507
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue