summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorritsuka <[email protected]>2015-01-13 08:08:04 +0000
committerritsuka <[email protected]>2015-01-13 08:08:04 +0000
commit677231f07d765e79afdc76e7741bb9e03bde1142 (patch)
treeb98775bb09649710c9b80b6370c8d261ce778cf9 /libhb
parent40edf3c9bce9f91fa3b5d8f422ad5df1e8ad3eb6 (diff)
MacGui: Move the audio/subtitles selection logic out of the view controllers. Now it's possible to create a HBJob and apply a preset to without the UI classes help.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6741 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/dvdnav.c9
1 files changed, 8 insertions, 1 deletions
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 */