]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/opencl.c
Merge commit 'd8a45d2d49f54fde042b195f9d5859251252493d'
[ffmpeg] / libavutil / opencl.c
index 36cb6fe81d743bbc5fd3bbf23f9837c85c416c7e..2df565329f3a328f59762c533a052aa905c6bc08 100644 (file)
@@ -588,6 +588,7 @@ end:
 
 void av_opencl_uninit(void)
 {
+    int i;
     cl_int status;
     LOCK_OPENCL;
     opencl_ctx.init_count--;
@@ -611,6 +612,9 @@ void av_opencl_uninit(void)
         }
         opencl_ctx.context = NULL;
     }
+    for (i = 0; i < opencl_ctx.kernel_code_count; i++) {
+        opencl_ctx.kernel_code[i].is_compiled = 0;
+    }
     free_device_list(&opencl_ctx.device_list);
 end:
     if (opencl_ctx.init_count <= 0)