diff options
author | ritsuka <[email protected]> | 2015-01-13 19:04:16 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2015-01-13 19:04:16 +0000 |
commit | acac8a09b29da8875c1d539796fc7f3bb7948939 (patch) | |
tree | 400b99790d1d1508dbfc54f240d4c31924b88c02 | |
parent | 2c5ec037274054f5dd4a270811c11afb5caa7331 (diff) |
Fix libdvdnav dvd name and add additional fallback if no name is found
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6744 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | contrib/libdvdnav/A01-name.patch | 10 | ||||
-rw-r--r-- | libhb/dvdnav.c | 9 |
2 files changed, 18 insertions, 1 deletions
diff --git a/contrib/libdvdnav/A01-name.patch b/contrib/libdvdnav/A01-name.patch new file mode 100644 index 000000000..8aa3cba6b --- /dev/null +++ b/contrib/libdvdnav/A01-name.patch @@ -0,0 +1,10 @@ +--- a/src/vm/vm.c ++++ b/src/vm/vm.c +@@ -402,6 +402,7 @@ + /* return 0; Not really used for now.. */ + } + /* ifoRead_TXTDT_MGI(vmgi); Not implemented yet */ ++ dvd_read_name(vm->dvd_name, vm->dvd_serial, dvdroot); + } + if (vm->vmgi) { + int i, mask;
\ No newline at end of file diff --git a/libhb/dvdnav.c b/libhb/dvdnav.c index f7153177c..9dcf9e530 100644 --- a/libhb/dvdnav.c +++ b/libhb/dvdnav.c @@ -334,6 +334,7 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t, uint64_t min_dura uint64_t duration, longest; int longest_pgcn, longest_pgn, longest_pgcn_end; const char * name; + unsigned char unused[1024]; const char * codec_name; hb_log( "scan: scanning title %d", t ); @@ -344,8 +345,13 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t, uint64_t min_dura { strncpy( title->name, name, sizeof( title->name ) ); } - else + + if (strlen(title->name) == 0) { + if( DVDUDFVolumeInfo( d->reader, title->name, sizeof( title->name ), + unused, sizeof( unused ) ) ) + { + char * p_cur, * p_last = d->path; for( p_cur = d->path; *p_cur; p_cur++ ) { @@ -358,6 +364,7 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t, uint64_t min_dura char *dot_term = strrchr(title->name, '.'); if (dot_term) *dot_term = '\0'; + } } /* VTS which our title is in */ |