MPlayer OSX port: Add a call to UDFFindFile to verify that we are opening a valid udf image. Patch by Emanuele Giaquita <emanuele.giaquinta@gmail.com>

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17491 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nplourde 2006-01-27 03:07:13 +00:00
parent 6325365976
commit 49880f795c
1 changed files with 9 additions and 0 deletions

View File

@ -465,10 +465,19 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
if(!dvd) {
mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,temp_device);
} else {
#if DVDREAD_VERSION <= LIBDVDREAD_VERSION(0,9,4)
int len;
if(!UDFFindFile(dvd,"/",&len)) {
mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,temp_device);
DVDClose(dvd);
} else
#endif
{
free(temp_device);
break;
}
}
}
if(!dvd) {
m_struct_free(&stream_opts,opts);