summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2016-11-13 02:06:59 -0500
committeryenatch <yenatch@gmail.com>2016-11-13 02:07:44 -0500
commit7901739b40e7ecef89c25037c5fe1d50a8e71f9a (patch)
treec39c2680f30c3c56cc12b4ff20f84b707e201183
parent2fe1ee863818529c4ff3ebcd994d13754cc56d1d (diff)
aif2pcm: Initialize pcm length if there are no MARK chunks.
-rw-r--r--tools/aif2pcm/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/aif2pcm/main.c b/tools/aif2pcm/main.c
index 48e1492f6..dd2d368a5 100644
--- a/tools/aif2pcm/main.c
+++ b/tools/aif2pcm/main.c
@@ -159,6 +159,11 @@ AifData *read_aif(uint8_t * aif_file_data, unsigned long aif_file_data_size)
pos += 10;
aif_data->sample_rate = sample_rate;
+
+ if (aif_data->num_samples == 0)
+ {
+ aif_data->num_samples = num_sample_frames;
+ }
}
else if (strcmp(chunk_name, "MARK") == 0)
{