]> git.tue.mpg.de Git - paraslash.git/commitdiff
wmadec: Kill non-btr code.
authorAndre Noll <maan@systemlinux.org>
Tue, 12 Jan 2010 03:36:37 +0000 (04:36 +0100)
committerAndre Noll <maan@systemlinux.org>
Tue, 12 Jan 2010 03:36:37 +0000 (04:36 +0100)
wmadec_filter.c

index 49f69b54d7601168ef195c938ae800a229f5ba19..0ec5878c3a836d389ebac7a7188bcdb809ddcc25 100644 (file)
@@ -1287,41 +1287,6 @@ err:
        btr_remove_node(btrn);
 }
 
-static ssize_t wmadec_convert(char *inbuffer, size_t len,
-               struct filter_node *fn)
-{
-       int ret, converted = 0;
-       struct private_wmadec_data *pwd = fn->private_data;
-
-       if (len <= WMA_FRAME_SKIP)
-               return 0;
-       if (!pwd) {
-               ret = wma_decode_init(inbuffer, len, &pwd);
-               if (ret <= 0)
-                       return ret;
-               fn->private_data = pwd;
-               fn->fc->channels = pwd->ahi.channels;
-               fn->fc->samplerate = pwd->ahi.sample_rate;
-               return pwd->ahi.header_len;
-       }
-       for (;;) {
-               int out_size;
-               if (converted + WMA_FRAME_SKIP + pwd->ahi.block_align > len)
-                       break;
-               out_size = fn->bufsize - fn->loaded;
-               if (out_size < 128 * 1024)
-                       break;
-               ret = wma_decode_superframe(pwd, fn->buf + fn->loaded,
-                       &out_size, (uint8_t *)inbuffer + converted + WMA_FRAME_SKIP,
-                       len - WMA_FRAME_SKIP);
-               if (ret < 0)
-                       return ret;
-               fn->loaded += out_size;
-               converted += ret + WMA_FRAME_SKIP;
-       }
-       return converted;
-}
-
 static void wmadec_open(struct filter_node *fn)
 {
        fn->bufsize = 1024 * 1024;
@@ -1340,7 +1305,6 @@ void wmadec_filter_init(struct filter *f)
 {
        f->open = wmadec_open;
        f->close = wmadec_close;
-       f->convert = wmadec_convert;
        f->execute = wmadec_execute;
        f->pre_select = generic_filter_pre_select;
        f->post_select = wmadec_post_select;