summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2020-11-22 23:08:33 +0100
committerLynne <dev@lynne.ee>2020-11-25 23:06:34 +0100
commitae8fc9922eb51ce8628f3e3333d1fe817518ca76 (patch)
tree1b7d84ff5ca72793851346739845e16783148ef4
parent993d8d94296e72cf5a1185fac573ba3c6ce3113d (diff)
lavfi/vulkan: allow calling glslang_uninit without a prior init
Allows us to uninit cleanly. This assert was also somewhat pointless as we assert every other function, so another assert would be triggered long before this one is.
-rw-r--r--libavfilter/glslang.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavfilter/glslang.cpp b/libavfilter/glslang.cpp
index 125eb5c364..986bddd789 100644
--- a/libavfilter/glslang.cpp
+++ b/libavfilter/glslang.cpp
@@ -235,8 +235,7 @@ int glslang_init(void)
void glslang_uninit(void)
{
pthread_mutex_lock(&glslang_mutex);
- av_assert0(glslang_refcount > 0);
- if (--glslang_refcount == 0)
+ if (glslang_refcount && (--glslang_refcount == 0))
FinalizeProcess();
pthread_mutex_unlock(&glslang_mutex);
}