Mercurial > audlegacy-plugins
changeset 2168:3c9527d25346
fix a crash bug in mp4_is_our_file().
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Sat, 17 Nov 2007 03:41:41 +0900 |
parents | d44adaddae8b |
children | 838098201ac9 |
files | src/aac/libmp4.c |
diffstat | 1 files changed, 12 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/aac/libmp4.c Fri Nov 16 03:35:28 2007 +0200 +++ b/src/aac/libmp4.c Sat Nov 17 03:41:41 2007 +0900 @@ -233,21 +233,20 @@ return TRUE; } if (!memcmp(magic, "ID3", 3)) { // ID3 tag bolted to the front, obfuscated magic bytes - aud_vfs_fclose(file); - if (extension &&( - !strcasecmp(extension, ".mp4") || // official extension - !strcasecmp(extension, ".m4a") || // Apple mp4 extension - !strcasecmp(extension, ".aac") // old MPEG2/4-AAC extension - )) - return 1; - else { - aud_vfs_fclose(file); - return 0; - } + aud_vfs_fclose(file); + if (extension &&( + !strcasecmp(extension, ".mp4") || // official extension + !strcasecmp(extension, ".m4a") || // Apple mp4 extension + !strcasecmp(extension, ".aac") // old MPEG2/4-AAC extension + )) + return 1; + else { + return 0; + } } if (!memcmp(&magic[4], "ftyp", 4)) { - aud_vfs_fclose(file); - return 1; + aud_vfs_fclose(file); + return 1; } aud_vfs_fclose(file); }