diff options
author | jstebbins <[email protected]> | 2009-07-09 16:36:17 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2009-07-09 16:36:17 +0000 |
commit | 766df9ffa24851ca6523311484c426c126eb6ee2 (patch) | |
tree | 87a7732e7c37e45cd9cdb5afe18561fe45f51726 /libhb/dvdnav.c | |
parent | 68dc5bceabe811f180c525c2d1b2f19edf1bd6cd (diff) |
libhb: DVD drive region detection on linux
Read and log the region mask of the DVD drive.
We get the occasional linux user that has an unset region. Logging
the region will help isolate the problem more quickly.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2675 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/dvdnav.c')
-rw-r--r-- | libhb/dvdnav.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libhb/dvdnav.c b/libhb/dvdnav.c index 378c1334b..40587b7ed 100644 --- a/libhb/dvdnav.c +++ b/libhb/dvdnav.c @@ -142,10 +142,21 @@ static hb_dvd_t * hb_dvdnav_init( char * path ) { hb_dvd_t * e; hb_dvdnav_t * d; + int region_mask; e = calloc( sizeof( hb_dvd_t ), 1 ); d = &(e->dvdnav); + /* Log DVD drive region code */ + if ( hb_dvd_region( path, ®ion_mask ) == 0 ) + { + hb_log( "dvd: Region mask 0x%02x", region_mask ); + if ( region_mask == 0xFF ) + { + hb_log( "dvd: Warning, DVD device has no region set" ); + } + } + /* Open device */ if( dvdnav_open(&d->dvdnav, path) != DVDNAV_STATUS_OK ) { |