[MPlayer-cvslog] r29078 - trunk/stream/stream_dvd.c

reimar subversion at mplayerhq.hu
Fri Mar 27 22:26:27 CET 2009


Author: reimar
Date: Fri Mar 27 22:26:26 2009
New Revision: 29078

Log:
Simplify detection of .ifo extension.

Modified:
   trunk/stream/stream_dvd.c

Modified: trunk/stream/stream_dvd.c
==============================================================================
--- trunk/stream/stream_dvd.c	Fri Mar 27 21:34:55 2009	(r29077)
+++ trunk/stream/stream_dvd.c	Fri Mar 27 22:26:26 2009	(r29078)
@@ -1097,9 +1097,9 @@ static int ifo_stream_open (stream_t *st
     char *ext;
     char* filename;
     struct stream_priv_s *spriv;
+    int len = strlen(stream->url);
 
-    ext = strrchr (stream->url, '.');
-    if (!ext || strcasecmp (ext + 1, "ifo"))
+    if (len < 4 || strcasecmp (stream->url + len - 4, ".ifo"))
         return STREAM_UNSUPPORTED;
 
     mp_msg(MSGT_DVD, MSGL_INFO, ".IFO detected. Redirecting to dvd://\n");


More information about the MPlayer-cvslog mailing list