Mercurial > libavformat.hg
comparison allformats.c @ 553:9e80f7595694 libavformat
prevent multiple av_register_all()
author | michael |
---|---|
date | Thu, 07 Oct 2004 21:11:08 +0000 |
parents | 59da52e5f5a5 |
children | 485a529adaee |
comparison
equal
deleted
inserted
replaced
552:56a704ec417e | 553:9e80f7595694 |
---|---|
24 /** | 24 /** |
25 * Initialize libavcodec and register all the codecs and formats. | 25 * Initialize libavcodec and register all the codecs and formats. |
26 */ | 26 */ |
27 void av_register_all(void) | 27 void av_register_all(void) |
28 { | 28 { |
29 static int inited = 0; | |
30 | |
31 if (inited != 0) | |
32 return; | |
33 inited = 1; | |
34 | |
29 avcodec_init(); | 35 avcodec_init(); |
30 avcodec_register_all(); | 36 avcodec_register_all(); |
31 | 37 |
32 mpegps_init(); | 38 mpegps_init(); |
33 mpegts_init(); | 39 mpegts_init(); |