# include <unistd.h>
#endif
#include <sys/types.h>
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
+#include <sys/stat.h>
+#include <fcntl.h>
#include <errno.h>
#include <vlc_common.h>
if( dvdnav_current_title_info( p_sys->dvdnav, &i_title,
&i_part ) == DVDNAV_STATUS_OK )
{
- if( i_title >= 0 && i_title < p_sys->i_title &&
- i_part >= 1 && i_part <= p_sys->title[i_title]->i_seekpoint &&
- p_demux->info.i_seekpoint != i_part - 1 )
+ if( i_title >= 0 && i_title < p_sys->i_title )
{
- p_demux->info.i_update |= INPUT_UPDATE_SEEKPOINT;
- p_demux->info.i_seekpoint = i_part - 1;
+ p_demux->info.i_update |= INPUT_UPDATE_TITLE;
+ p_demux->info.i_title = i_title;
+
+ if( i_part >= 1 && i_part <= p_sys->title[i_title]->i_seekpoint &&
+ p_demux->info.i_seekpoint != i_part - 1 )
+ {
+ p_demux->info.i_update |= INPUT_UPDATE_SEEKPOINT;
+ p_demux->info.i_seekpoint = i_part - 1;
+ }
}
}
break;
if( *psz_lang == '\0' )
continue;
if( !strcasecmp( pl->psz_eng_name, psz_lang ) ||
- !strcasecmp( pl->psz_native_name, psz_lang ) ||
!strcasecmp( pl->psz_iso639_1, psz_lang ) ||
!strcasecmp( pl->psz_iso639_2T, psz_lang ) ||
!strcasecmp( pl->psz_iso639_2B, psz_lang ) )
#endif
int ret = VLC_EGENERIC;
-
-#ifdef HAVE_SYS_STAT_H
struct stat stat_info;
if( fstat( fd, &stat_info ) == -1 )
goto bailout;
-
if( !S_ISREG( stat_info.st_mode ) )
{
if( S_ISDIR( stat_info.st_mode ) || S_ISBLK( stat_info.st_mode ) )
ret = VLC_SUCCESS; /* Let dvdnav_open() do the probing */
goto bailout;
}
-#endif
+
/* Match extension as the anchor exhibits too many false positives */
const char *ext = strrchr( psz_name, '.' );
if( ext == NULL )
goto bailout;
ext++;
if( strcasecmp( ext, "iso" ) && strcasecmp( ext, "img" ) &&
- strcasecmp( ext, "mdf" ) && strcasecmp( ext, "dvd" ) )
+ strcasecmp( ext, "mdf" ) && strcasecmp( ext, "dvd" ) &&
+ strcasecmp( ext, "bin" ) && strcasecmp( ext, "nrg" ) )
goto bailout;
/* Try to find the anchor (2 bytes at LBA 256) */