]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - bitstream.c
make init_vlc() return void.
[paraslash.git] / bitstream.c
index 11429489ee2b2fb64fa1e9eac25aaf0148e35594..e9f7126e00fd7392d72dbf414a5e4aeef35c3fa7 100644 (file)
@@ -155,22 +155,17 @@ static int build_table(struct vlc *vlc, int table_nb_bits, int nb_codes,
  * The wrap and size parameters allow to use any memory configuration and
  * types (byte/word/long) to store the bits and codes tables.
  */
-int init_vlc(struct vlc *vlc, int nb_bits, int nb_codes,
+void init_vlc(struct vlc *vlc, int nb_bits, int nb_codes,
                const void *bits, const void *codes, int codes_wrap,
                int codes_size)
 {
-       int ret;
-
-       PARA_INFO_LOG("nb_codes=%d\n", nb_codes);
+       PARA_INFO_LOG("nb_codes: %d\n", nb_codes);
        vlc->bits = nb_bits;
        vlc->table = NULL;
        vlc->table_allocated = 0;
        vlc->table_size = 0;
-       ret = build_table(vlc, nb_bits, nb_codes, bits,
+       build_table(vlc, nb_bits, nb_codes, bits,
                codes, codes_wrap, codes_size, 0, 0);
-       if (ret < 0)
-               freep(&vlc->table);
-       return ret;
 }
 
 void free_vlc(struct vlc *vlc)