From caaeefc5917fb625375c46ad2c03c992c234569f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 7 Oct 2004 21:11:08 +0000 Subject: [PATCH] prevent multiple av_register_all() Originally committed as revision 3570 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/allformats.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/allformats.c b/libavformat/allformats.c index 30a63fa62c..c2a50221a8 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();