Fix use of uninitialized afhi->header_len.
[paraslash.git] / aac_afh.c
index e495bf1484c7b832ffba01a36f8e3718092f2153..11dde5711976daad4ca42da1d6c8ca895e7a3972 100644 (file)
--- a/aac_afh.c
+++ b/aac_afh.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2007 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2006-2008 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -137,12 +137,10 @@ static int aac_get_file_info(char *map, size_t numbytes,
        ret = (afhi->chunk_table[afhi->chunks_total] - afhi->chunk_table[0]) * 8; /* bits */
        ret += (channels * afhi->seconds_total * 500); /* avoid rounding error */
        afhi->bitrate = ret / (channels * afhi->seconds_total * 1000);
-       sprintf(afhi->info_string, "audio_file_info1:%lu x %lums, "
-               "%uHz, %d channel%s, %ukb/s\n"
-               "audio_file_info2:\n"
-               "audio_file_info3:\n",
-               afhi->chunks_total, tv2ms(&afhi->chunk_tv),
-               afhi->frequency, channels, channels == 1? "" : "s", afhi->bitrate
+       sprintf(afhi->info_string, "%s:\n%s:\n%s:\n",
+               status_item_list[SI_AUDIO_FILE_INFO],
+               status_item_list[SI_TAGINFO1],
+               status_item_list[SI_TAGINFO2]
        );
        tv_scale(20, &afhi->chunk_tv, &afhi->eof_tv);
        ret = 1;