1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-05 13:47:39 +00:00

Simplify detection of .ifo extension.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29078 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2009-03-27 21:26:26 +00:00
parent 255bca1ecd
commit 8198495234

View File

@ -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");