From 53fe4aa13235ec51f8289b167bd429e405f2817b Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 24 Nov 2019 17:33:51 +0100 Subject: [PATCH] mp3_afh: Don't bail out on short files. It's perfectly OK to have mp3 files which are shorter than two seconds. For example lexico.com offers mp3 downloads to learn the pronuciation of single words. These files are often shorter than one second. The check for short length files predates the git history. Most likely it was added for no good reason, so drop it. --- mp3_afh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mp3_afh.c b/mp3_afh.c index f279cd57..728b25b8 100644 --- a/mp3_afh.c +++ b/mp3_afh.c @@ -675,7 +675,7 @@ static int mp3_get_file_info(char *map, size_t numbytes, int fd, ret = mp3_read_info((unsigned char *)map, numbytes, fd, afhi); if (ret < 0) return ret; - if (afhi->seconds_total < 2 || !afhi->chunks_total) + if (afhi->chunks_total == 0) return -E_MP3_INFO; return 1; } -- 2.39.2