mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
multiple init bugfix (patch by Alex Beregszaszi <alex@naxine.org>)
Originally committed as revision 371 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
ff3dfbae1a
commit
0344cd0a7c
@ -385,12 +385,24 @@ int avpicture_get_size(int pix_fmt, int width, int height)
|
|||||||
/* must be called before any other functions */
|
/* must be called before any other functions */
|
||||||
void avcodec_init(void)
|
void avcodec_init(void)
|
||||||
{
|
{
|
||||||
|
static int inited = 0;
|
||||||
|
|
||||||
|
if (inited != 0)
|
||||||
|
return;
|
||||||
|
inited = 1;
|
||||||
|
|
||||||
dsputil_init();
|
dsputil_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* simple call to use all the codecs */
|
/* simple call to use all the codecs */
|
||||||
void avcodec_register_all(void)
|
void avcodec_register_all(void)
|
||||||
{
|
{
|
||||||
|
static int inited = 0;
|
||||||
|
|
||||||
|
if (inited != 0)
|
||||||
|
return;
|
||||||
|
inited = 1;
|
||||||
|
|
||||||
/* encoders */
|
/* encoders */
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_ENCODERS
|
||||||
register_avcodec(&ac3_encoder);
|
register_avcodec(&ac3_encoder);
|
||||||
|
Loading…
Reference in New Issue
Block a user