unsigned sample_count, sample_size;
if (p[0] != 's' || p[1] != 't' || p[2] != 's' || p[3] != 'z')
continue;
PARA_DEBUG_LOG("found stsz@%d\n", i);
i += 8;
unsigned sample_count, sample_size;
if (p[0] != 's' || p[1] != 't' || p[2] != 's' || p[3] != 'z')
continue;
PARA_DEBUG_LOG("found stsz@%d\n", i);
i += 8;
- sample_size = aac_read_int32(buf + i);
- PARA_DEBUG_LOG("sample size: %d\n", sample_size);
+ sample_size = read_u32_be(buf + i);
+ PARA_DEBUG_LOG("sample size: %u\n", sample_size);
if (p[0] != 'm' || p[1] != 'e' || p[2] != 't' || p[3] != 'a')
continue;
PARA_INFO_LOG("found metadata at offset %d\n", i);
if (p[0] != 'm' || p[1] != 'e' || p[2] != 't' || p[3] != 'a')
continue;
PARA_INFO_LOG("found metadata at offset %d\n", i);
afhi->chunk_table = para_malloc((afhi->chunks_total + 1) * sizeof(size_t));
for (i = 1; i <= afhi->chunks_total; i++) {
if (skip + 4 > numbytes)
break;
afhi->chunk_table = para_malloc((afhi->chunks_total + 1) * sizeof(size_t));
for (i = 1; i <= afhi->chunks_total; i++) {
if (skip + 4 > numbytes)
break;
ms = 1000.0 * afhi->chunks_total * tmp / mp4ASC->samplingFrequency;
ms2tv(ms, &total);
tv_divide(afhi->chunks_total, &total, &afhi->chunk_tv);
ms = 1000.0 * afhi->chunks_total * tmp / mp4ASC->samplingFrequency;
ms2tv(ms, &total);
tv_divide(afhi->chunks_total, &total, &afhi->chunk_tv);
mp4ASC->samplingFrequency, ms / 1000,
afhi->chunks_total, tv2ms(&afhi->chunk_tv));
if (ms < 1000)
mp4ASC->samplingFrequency, ms / 1000,
afhi->chunks_total, tv2ms(&afhi->chunk_tv));
if (ms < 1000)
unsigned char channels = 0;
mp4AudioSpecificConfig mp4ASC;
NeAACDecHandle handle = NULL;
unsigned char channels = 0;
mp4AudioSpecificConfig mp4ASC;
NeAACDecHandle handle = NULL;
- ret = aac_find_esds(umap, numbytes, &skip, &decoder_len);
+ ret = aac_find_esds(map, numbytes, &skip, &decoder_len);
- if (NeAACDecInit(handle, umap + skip, decoder_len, &rate, &channels))
+ if (NeAACDecInit(handle, (unsigned char *)map + skip, decoder_len,
+ &rate, &channels))
goto out;
if (!channels)
goto out;
PARA_DEBUG_LOG("rate: %lu, channels: %d\n", rate, channels);
ret = -E_MP4ASC;
goto out;
if (!channels)
goto out;
PARA_DEBUG_LOG("rate: %lu, channels: %d\n", rate, channels);
ret = -E_MP4ASC;
- if (NeAACDecAudioSpecificConfig(umap + skip, numbytes - skip, &mp4ASC))
+ if (NeAACDecAudioSpecificConfig((unsigned char *)map + skip,
+ numbytes - skip, &mp4ASC))