From: Andre Date: Thu, 4 May 2006 21:34:16 +0000 (+0200) Subject: aacdec: kill some dead code X-Git-Tag: v0.2.14~151 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=e93d64d5f46d62de6fc09c05ef2b47ac1d04f340;p=paraslash.git aacdec: kill some dead code --- diff --git a/aacdec.c b/aacdec.c index 0796e9c5..5e532006 100644 --- a/aacdec.c +++ b/aacdec.c @@ -52,12 +52,6 @@ struct private_mp4dec_data { int noffsets; int *offset; int offset_pos; - -#if 0 - int nsamples; - int *table; - int table_pos; -#endif }; static int read_mp4_descr_length(struct private_mp4dec_data *padd) @@ -122,45 +116,6 @@ static int read_int32(struct private_mp4dec_data *padd, unsigned *result) return 1; } -#if 0 -int fill_table(struct private_mp4dec_data *padd) -{ - int i, ret; - - for (i = padd->table_pos; i < padd->nsamples; i++) { - ret = read_int32(padd, &padd->table[i]); - if (ret < 0) - return -1; - PARA_DEBUG_LOG("sample #%d: %d\n", i, padd->table[i]); - padd->table_pos++; - } - return 1; - -} -int find_stsz(struct private_mp4dec_data *padd) -{ - int ret; - - for (; padd->consumed < padd->inbuf_len; padd->consumed++) { - char *p = padd->inbuf + padd->consumed; - - if (p[0] != 's' || p[1] != 't' || p[2] != 's' || p[3] != 'z') - continue; - PARA_INFO_LOG("found stsz: %d\n", padd->consumed); - padd->consumed += 12; - ret = -E_STSZ; - if (read_int32(padd, &padd->nsamples) < 0) - goto out; - PARA_INFO_LOG("num samples: %d\n", padd->nsamples); - padd->table = para_malloc(padd->nsamples * sizeof(int)); - return 1; - } - ret = -E_STSZ; -out: - return ret; -} -#endif - static int fill_offset_table(struct private_mp4dec_data *padd) { int i, ret; @@ -230,22 +185,7 @@ static ssize_t mp4dec(char *inbuffer, size_t len, struct filter_node *fn) padd->initialized = 1; } padd->consumed = 0; -#if 0 - if (!padd->table_pos) { - ret = find_stsz(padd); - if (ret < 0) - goto out; - } - if (padd->table_pos < padd->nsamples) { - fill_table(padd); - ret = padd->consumed; - goto out; - } -#endif if (!padd->offset_pos) { -// ret = find_stco(padd); -// if (ret < 0) -// goto out; ret = len; if (find_stco(padd) < 0) goto out;