On Tue, 1 Nov 2011, Martin Storsjö wrote:

+void ff_tls_init(void)
+{
+    avpriv_lock_avformat();
+#if CONFIG_OPENSSL
+    openssl_init++;
+    if (openssl_init > 1)
+        return;

I realized that this doesn't unlock the mutex - changed it locally to:

if (!init) {
   // do all init
}
init++;

Which should be slightly clearer and have less risk for forgetting to unlock mutexes, while indenting the whole function one step further.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to