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)
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;
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;