]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - afh_common.c
fecdec: Wait until the second FEC group is complete.
[paraslash.git] / afh_common.c
index aa7f3d92444faddf9d193aa6c2b86fe04b697d14..7d4ab08952dbb259075b96f73e228f81da7db8e9 100644 (file)
@@ -208,9 +208,9 @@ int compute_afhi(const char *path, char *data, size_t size, int fd,
  */
 const char *audio_format_name(int i)
 {
-       //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)";
+       if (i < 0 || i >= ARRAY_SIZE(afl) - 1)
+               return "???";
+       return afl[i].name;
 }
 
 /**
@@ -256,9 +256,10 @@ uint32_t afh_get_largest_chunk_size(struct afh_info *afhi)
  */
 void afh_get_header(struct afh_info *afhi, void *map, const char **buf, size_t *len)
 {
-       if (!map || !afhi || ! afhi->header_len) {
+       if (!map || !afhi || !afhi->header_len) {
                *buf = NULL;
                *len = 0;
+               return;
        }
        *len = afhi->header_len;
        *buf = map + afhi->header_offset;