From: Andre Noll Date: Thu, 22 Oct 2009 17:07:55 +0000 (+0200) Subject: Don't try to init the decoder if less than WMA_FRAME_SKIP bytes are available. X-Git-Tag: v0.4.1~41 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=f86f31322298aa0a95e590c1eeaa978d3a3ba43a Don't try to init the decoder if less than WMA_FRAME_SKIP bytes are available. --- diff --git a/wmadec_filter.c b/wmadec_filter.c index 85ba871c..35e2703c 100644 --- a/wmadec_filter.c +++ b/wmadec_filter.c @@ -178,7 +178,6 @@ static void init_coef_vlc(struct vlc *vlc, uint16_t **prun_table, uint16_t *run_table, *level_table; int i, l, j, k, level; - PARA_ERROR_LOG("n: %d\n", n); init_vlc(vlc, VLCBITS, n, table_bits, table_codes, 4); run_table = para_malloc(n * sizeof(uint16_t)); @@ -1251,6 +1250,8 @@ static ssize_t wmadec_convert(char *inbuffer, size_t len, if (out_size < 128 * 1024) return 0; + if (len <= WMA_FRAME_SKIP) + return 0; if (!pwd) { ret = wma_decode_init(inbuffer, len, &pwd); if (ret <= 0)