X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=vss.c;h=5b7ed320aaaa38885f208dda80ad51d690999b2c;hp=98ad11f610087ffd5319adbbb8ecf503ccdb3b88;hb=32facbd1b7948f146515e53194cfd4f33c54353f;hpb=ae15406fdf6ac44dc7a15e62c2d0056abe7192ac diff --git a/vss.c b/vss.c index 98ad11f6..5b7ed320 100644 --- a/vss.c +++ b/vss.c @@ -11,11 +11,14 @@ * senders. */ +#include /* mmap */ +#include /* gettimeofday */ +#include +#include + #include "para.h" #include "afh.h" #include "server.h" -#include /* mmap */ -#include /* gettimeofday */ #include "server.cmdline.h" #include "afs_common.h" #include "vss.h" @@ -153,8 +156,9 @@ unsigned int vss_paused(void) */ const char *audio_format_name(int i) { - assert(i >= 0 && i < ARRAY_SIZE(afl)); - return afl[i].name; + //PARA_NOTICE_LOG("array size: %u¸ requested: %d\n", ARRAY_SIZE(afl), i); + assert(i < 0 || i < ARRAY_SIZE(afl) - 1); + return i >= 0? afl[i].name : "(none)"; } /** @@ -229,7 +233,7 @@ int guess_audio_format(const char *name) return i; } } - return -1; + return -E_BAD_AUDIO_FILE_SUFFIX; } static int get_audio_format(int omit)