Mercurial > libavcodec.hg
comparison utils.c @ 303:9a931fd8d06c libavcodec
multiple init bugfix (patch by Alex Beregszaszi <alex@naxine.org>)
author | michaelni |
---|---|
date | Mon, 01 Apr 2002 13:24:47 +0000 |
parents | e10840e4f773 |
children | 764aeec1320e |
comparison
equal
deleted
inserted
replaced
302:826b179dad50 | 303:9a931fd8d06c |
---|---|
383 | 383 |
384 | 384 |
385 /* must be called before any other functions */ | 385 /* must be called before any other functions */ |
386 void avcodec_init(void) | 386 void avcodec_init(void) |
387 { | 387 { |
388 static int inited = 0; | |
389 | |
390 if (inited != 0) | |
391 return; | |
392 inited = 1; | |
393 | |
388 dsputil_init(); | 394 dsputil_init(); |
389 } | 395 } |
390 | 396 |
391 /* simple call to use all the codecs */ | 397 /* simple call to use all the codecs */ |
392 void avcodec_register_all(void) | 398 void avcodec_register_all(void) |
393 { | 399 { |
400 static int inited = 0; | |
401 | |
402 if (inited != 0) | |
403 return; | |
404 inited = 1; | |
405 | |
394 /* encoders */ | 406 /* encoders */ |
395 #ifdef CONFIG_ENCODERS | 407 #ifdef CONFIG_ENCODERS |
396 register_avcodec(&ac3_encoder); | 408 register_avcodec(&ac3_encoder); |
397 register_avcodec(&mp2_encoder); | 409 register_avcodec(&mp2_encoder); |
398 #ifdef CONFIG_MP3LAME | 410 #ifdef CONFIG_MP3LAME |