changeset 553:9e80f7595694 libavformat

prevent multiple av_register_all()
author michael
date Thu, 07 Oct 2004 21:11:08 +0000
parents 56a704ec417e
children e1f17fcfb92c
files allformats.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/allformats.c	Thu Oct 07 01:55:34 2004 +0000
+++ b/allformats.c	Thu Oct 07 21:11:08 2004 +0000
@@ -26,6 +26,12 @@
  */
 void av_register_all(void)
 {
+    static int inited = 0;
+    
+    if (inited != 0)
+        return;
+    inited = 1;
+
     avcodec_init();
     avcodec_register_all();