]> git.sesse.net Git - ffmpeg/commitdiff
avoid multiple init
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 17 Oct 2002 00:04:33 +0000 (00:04 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 17 Oct 2002 00:04:33 +0000 (00:04 +0000)
Originally committed as revision 7770 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc

postproc/yuv2rgb.c

index 96764d177cf2642a9e19eb9856f740d767f043be..cec5f3f9fb6ddda4b1c3634ef596ac0a0bf15364 100644 (file)
@@ -232,7 +232,7 @@ const int32_t Inverse_Table_6_9[8][4] = {
 
 void *yuv2rgb_c_init (unsigned bpp, int mode, void *table_rV[256], void *table_gU[256], int table_gV[256], void *table_bU[256]);
 
-yuv2rgb_fun yuv2rgb;
+yuv2rgb_fun yuv2rgb= NULL;
 
 static void (* yuv2rgb_c_internal) (uint8_t *, uint8_t *,
                                    uint8_t *, uint8_t *,
@@ -263,7 +263,7 @@ void * table_bU[256];
 
 void yuv2rgb_init (unsigned bpp, int mode)
 {
-    yuv2rgb = NULL;
+    if(yuv2rgb) return;
 #ifdef CAN_COMPILE_X86_ASM
     if(gCpuCaps.hasMMX2)
     {