diff options
Diffstat (limited to 'libhb/dvd.c')
-rw-r--r-- | libhb/dvd.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libhb/dvd.c b/libhb/dvd.c index f0cc521bc..7d19fae11 100644 --- a/libhb/dvd.c +++ b/libhb/dvd.c @@ -41,6 +41,29 @@ struct hb_dvd_s static void FindNextCell( hb_dvd_t * ); static int dvdtime2msec( dvd_time_t * ); +char * hb_dvd_name( char * path ) +{ + static char name[1024]; + unsigned char unused[1024]; + dvd_reader_t * reader; + + reader = DVDOpen( path ); + if( !reader ) + { + return NULL; + } + + if( DVDUDFVolumeInfo( reader, name, sizeof( name ), + unused, sizeof( unused ) ) ) + { + DVDClose( reader ); + return NULL; + } + + DVDClose( reader ); + return name; +} + /*********************************************************************** * hb_dvd_init *********************************************************************** |