changeset 29041:1b8e2b6fa928

Simplify detection of .ifo extension.
author reimar
date Fri, 27 Mar 2009 21:26:26 +0000
parents 963f578121c6
children c198fbb7172e
files stream/stream_dvd.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_dvd.c	Fri Mar 27 20:34:55 2009 +0000
+++ b/stream/stream_dvd.c	Fri Mar 27 21:26:26 2009 +0000
@@ -1097,9 +1097,9 @@
     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");