]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9704 #resolve [Seeking video files with mod_av after it reaches the end does not...
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 7 Nov 2016 18:14:25 +0000 (12:14 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 7 Nov 2016 18:14:25 +0000 (12:14 -0600)
src/mod/applications/mod_av/avformat.c

index a1fc0069b7d14d6553a362e45b64323b4c303d7e..eb48dfaf94219eb0f9c70ce185f8e8dfef683455 100644 (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;
 }