X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=vss.c;h=98ad11f610087ffd5319adbbb8ecf503ccdb3b88;hp=a6d3dfc03469095e8b5d398bf79d930c44133ca9;hb=ae15406fdf6ac44dc7a15e62c2d0056abe7192ac;hpb=c02bbaa2467c19180d360d6914a13d17e323185c diff --git a/vss.c b/vss.c index a6d3dfc0..98ad11f6 100644 --- a/vss.c +++ b/vss.c @@ -144,16 +144,17 @@ unsigned int vss_paused(void) } /** - * get the name of the given audio format + * Get the name of the given audio format. * - * \param i the audio format number + * \param i The audio format number. * * This returns a pointer to statically allocated memory so it * must not be freed by the caller. */ const char *audio_format_name(int i) { - return i >= 0? afl[i].name : "(none)"; + assert(i >= 0 && i < ARRAY_SIZE(afl)); + return afl[i].name; } /** @@ -278,6 +279,7 @@ int compute_afhi(const char *path, char *data, size_t size, ret = afl[i].get_file_info(data, size, afhi); if (ret >= 0) return i; + PARA_WARNING_LOG("%s\n", PARA_STRERROR(-ret)); } return -E_AUDIO_FORMAT; }