]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/blobdiff - libavcodec/wnv1.c
frsh: Export information about the last RTP contract and VRES
[frescor/ffmpeg.git] / libavcodec / wnv1.c
index fa3a308dc06bd6b31ede29f8dee1ededc67fc78d..aec474f2dea0a521922c707189af5076575b78e5 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 #include "avcodec.h"
-#include "bitstream.h"
+#include "get_bits.h"
 
 
 typedef struct WNV1Context{
@@ -129,15 +129,16 @@ static int decode_frame(AVCodecContext *avctx,
 
 static av_cold int decode_init(AVCodecContext *avctx){
     WNV1Context * const l = avctx->priv_data;
+    static VLC_TYPE code_table[1 << CODE_VLC_BITS][2];
 
     l->avctx = avctx;
     avctx->pix_fmt = PIX_FMT_YUV422P;
 
-    if(!code_vlc.table){
-        init_vlc(&code_vlc, CODE_VLC_BITS, 16,
-                    &code_tab[0][1], 4, 2,
-                    &code_tab[0][0], 4, 2, 1);
-    }
+    code_vlc.table = code_table;
+    code_vlc.table_allocated = 1 << CODE_VLC_BITS;
+    init_vlc(&code_vlc, CODE_VLC_BITS, 16,
+             &code_tab[0][1], 4, 2,
+             &code_tab[0][0], 4, 2, INIT_VLC_USE_NEW_STATIC);
 
     return 0;
 }