[SCM] libav/experimental: prevent multiple av_register_all()

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:41:49 UTC 2013


The following commit has been merged in the experimental branch:
commit caaeefc5917fb625375c46ad2c03c992c234569f
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Thu Oct 7 21:11:08 2004 +0000

    prevent multiple av_register_all()
    
    Originally committed as revision 3570 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 30a63fa..c2a5022 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -26,6 +26,12 @@
  */
 void av_register_all(void)
 {
+    static int inited = 0;
+    
+    if (inited != 0)
+        return;
+    inited = 1;
+
     avcodec_init();
     avcodec_register_all();
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list