diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-27 21:26:26 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-27 21:26:26 +0000 |
commit | 8198495234d85e9003daf970f9e7d4f335724c61 (patch) | |
tree | abcca5cf41251ba021e70df52b2c69c9a0b2b7d1 /stream/stream_dvd.c | |
parent | 255bca1ecd8833222cf52efd47f9258910da57d4 (diff) | |
download | mpv-8198495234d85e9003daf970f9e7d4f335724c61.tar.bz2 mpv-8198495234d85e9003daf970f9e7d4f335724c61.tar.xz |
Simplify detection of .ifo extension.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29078 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/stream_dvd.c')
-rw-r--r-- | stream/stream_dvd.c | 4 |
1 files 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"); |