changeset 9522:bf81b6f776ea libavcodec

Set flag after VC-1 VLCs are initialized to avoid race condition
author kostya
date Tue, 21 Apr 2009 05:42:22 +0000
parents d8e5002210cb
children 3045aef3405c
files vc1.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vc1.c	Tue Apr 21 05:24:50 2009 +0000
+++ b/vc1.c	Tue Apr 21 05:42:22 2009 +0000
@@ -62,7 +62,6 @@
     /* VLC tables */
     if(!done)
     {
-        done = 1;
         init_vlc(&ff_vc1_bfraction_vlc, VC1_BFRACTION_VLC_BITS, 23,
                  ff_vc1_bfraction_bits, 1, 1,
                  ff_vc1_bfraction_codes, 1, 1, INIT_VLC_USE_STATIC);
@@ -106,6 +105,7 @@
         init_vlc(&ff_msmp4_mb_i_vlc, MB_INTRA_VLC_BITS, 64,
                  &ff_msmp4_mb_i_table[0][1], 4, 2,
                  &ff_msmp4_mb_i_table[0][0], 4, 2, INIT_VLC_USE_STATIC);
+        done = 1;
     }
 
     /* Other defaults */