diff options
author | jstebbins <[email protected]> | 2014-12-16 16:50:50 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2014-12-16 16:50:50 +0000 |
commit | f56efd7b52c89da8cac55b4d4a187f2c87fdfee6 (patch) | |
tree | 24eacb856704fa8e4b8b8f0edc76568916f70255 /libhb/dvdnav.c | |
parent | d0a975e42dcab93e1d2eead350fb1ba3951d977c (diff) |
json: add json APIs
There are several changes to job and title structs that break
current windows interop code. The interop code should be changed
such that it only uses json APIs. So if there is any missing
features (or bugs) in these APIs, please let me know.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6602 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/dvdnav.c')
-rw-r--r-- | libhb/dvdnav.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libhb/dvdnav.c b/libhb/dvdnav.c index 2e7973c0d..f7153177c 100644 --- a/libhb/dvdnav.c +++ b/libhb/dvdnav.c @@ -664,7 +664,7 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t, uint64_t min_dura lang = lang_for_code( ifo->vtsi_mat->vts_subp_attr[i].lang_code ); subtitle = calloc( sizeof( hb_subtitle_t ), 1 ); - subtitle->track = i+1; + subtitle->track = i; subtitle->id = ( ( 0x20 + position ) << 8 ) | 0xbd; snprintf( subtitle->lang, sizeof( subtitle->lang ), "%s", strlen(lang->native_name) ? lang->native_name : lang->eng_name); @@ -809,17 +809,20 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t, uint64_t min_dura switch( ifo->vtsi_mat->vts_video_attr.display_aspect_ratio ) { case 0: - title->container_aspect = 4. / 3.; + title->container_dar.num = 4; + title->container_dar.den = 3; break; case 3: - title->container_aspect = 16. / 9.; + title->container_dar.num = 16; + title->container_dar.den = 9; break; default: hb_log( "scan: unknown aspect" ); goto fail; } - hb_log( "scan: aspect = %g", title->container_aspect ); + hb_log("scan: aspect = %d:%d", + title->container_dar.num, title->container_dar.den); /* This title is ok so far */ goto cleanup; |