changeset 28:a4513169b27e trunk

[svn] Possible crash fix.
author nenolod
date Tue, 25 Oct 2005 21:46:47 -0700
parents d160ae2251e9
children 1d6c09e16e1e
files Input/aac/src/libmp4.c
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Input/aac/src/libmp4.c	Tue Oct 25 21:26:50 2005 -0700
+++ b/Input/aac/src/libmp4.c	Tue Oct 25 21:46:47 2005 -0700
@@ -113,14 +113,13 @@
 
 static int	mp4_isFile(char *filename)
 {
-  if(filename){
-    gchar*	extention;
+  char *ext;
 
-    extention = strrchr(filename, '.');
-    if (extention &&
-	!strcasecmp(extention, ".mp4") ||	// official extention
-	!strcasecmp(extention, ".m4a") ||	// Apple mp4 extention
-	!strcasecmp(extention, ".aac")		// old MPEG2/4-AAC extention
+  if(filename){
+    ext = strrchr(filename, '.');
+    if (!strncasecmp(filename, ".mp4", 3) ||	// official extention
+	!strncasecmp(filename, ".m4a", 3) ||	// Apple mp4 extention
+	!strncasecmp(filename, ".aac", 3)	// old MPEG2/4-AAC extention
 	){
       return (1);
     }