]> git.sesse.net Git - mlt/commitdiff
Fix for file identification and dv
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Tue, 19 Apr 2005 13:33:55 +0000 (13:33 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Tue, 19 Apr 2005 13:33:55 +0000 (13:33 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@715 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/dv/producer_libdv.c

index 7d5fb25214245307bd013b5a3c755491030fb990..5cde8eb3e08eccff98b5eb441f4d29b6cb1a4db8 100644 (file)
@@ -151,9 +151,9 @@ mlt_producer producer_libdv_init( char *filename )
                producer->get_frame = producer_get_frame;
 
                // If we have mov or dv, then we'll use an alternative producer
-               if ( strncasecmp( strrchr( filename, '.' ), ".avi", 4 ) == 0 ||
-                        strncasecmp( strrchr( filename, '.' ), ".dv", 3 ) == 0 ||
-                        strncasecmp( strrchr( filename, '.' ), ".mov", 4 ) == 0 )
+               if ( strchr( filename, '.' ) != NULL && (
+                        strncasecmp( strrchr( filename, '.' ), ".avi", 4 ) == 0 ||
+                        strncasecmp( strrchr( filename, '.' ), ".mov", 4 ) == 0 ) )
                {
                        // Load via an alternative mechanism
                        this->alternative = mlt_factory_producer( "kino", filename );