filter: Remove allocation of filter buffers.
[paraslash.git] / mp3dec_filter.c
index b13c602bbf6a4ef03b20093254bcf80d87013399..bff42090158d4929cab5e7cbdfdcf20aff864bdf 100644 (file)
@@ -114,8 +114,6 @@ static void mp3dec_close(struct filter_node *fn)
        mad_frame_finish(&pmd->frame);
        mad_stream_finish(&pmd->stream);
 
-       free(fn->buf);
-       fn->buf = NULL;
        free(pmd);
        fn->private_data = NULL;
 }
@@ -207,9 +205,6 @@ static void mp3dec_open(struct filter_node *fn)
        mad_stream_init(&pmd->stream);
        mad_frame_init(&pmd->frame);
        mad_synth_init(&pmd->synth);
-       fn->loaded = 0;
-       fn->bufsize = mp3_conf->bufsize_arg * 1024;
-       fn->buf = para_calloc(fn->bufsize);
        if (mp3_conf->ignore_crc_given)
                mad_stream_options(&pmd->stream, MAD_OPTION_IGNORECRC);
 }
@@ -223,11 +218,6 @@ static int mp3dec_parse_config(int argc, char **argv, void **config)
        ret = -E_MP3DEC_SYNTAX;
        if (mp3dec_cmdline_parser(argc, argv, mp3_conf))
                goto err;
-       ret = -ERRNO_TO_PARA_ERROR(EINVAL);
-       if (mp3_conf->bufsize_arg < 32)
-               goto err;
-       if (mp3_conf->bufsize_arg >= INT_MAX / 1024)
-               goto err;
        *config = mp3_conf;
        return 1;
 err: