From 8198495234d85e9003daf970f9e7d4f335724c61 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 27 Mar 2009 21:26:26 +0000 Subject: Simplify detection of .ifo extension. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29078 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream_dvd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c index ae07239ad5..70a94303e6 100644 --- a/stream/stream_dvd.c +++ b/stream/stream_dvd.c @@ -1097,9 +1097,9 @@ static int ifo_stream_open (stream_t *stream, int mode, void *opts, int *file_fo 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"); -- cgit v1.2.3