summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2017-06-26 13:07:12 -0700
committerJohn Stebbins <[email protected]>2017-06-26 13:08:04 -0700
commit6071d4c53b9d327e318452b16780ceeb80303275 (patch)
tree1435ad1eb3f34421f4c641c028104d028266cb88 /libhb
parent3a0b7d29770107658ba13e365a8550cd3dc0e40e (diff)
scan: fix vobsub & pgs width/height for some stream types
Fixes https://github.com/HandBrake/HandBrake/issues/798
Diffstat (limited to 'libhb')
-rw-r--r--libhb/scan.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libhb/scan.c b/libhb/scan.c
index e117e58fc..b096c4e4c 100644
--- a/libhb/scan.c
+++ b/libhb/scan.c
@@ -266,20 +266,20 @@ static void ScanFunc( void * _data )
j++;
}
- if ( data->dvd || data->bd )
+ // VOBSUB and PGS width and height needs to be set to the
+ // title width and height for any stream type that does
+ // not provide this information (DVDs, BDs, VOBs, and M2TSs).
+ // Title width and height don't get set until we decode
+ // previews, so we can't set subtitle width/height till
+ // we get here.
+ for (j = 0; j < hb_list_count(title->list_subtitle); j++)
{
- // The subtitle width and height needs to be set to the
- // title widht and height for DVDs. title width and
- // height don't get set until we decode previews, so
- // we can't set subtitle width/height till we get here.
- for( j = 0; j < hb_list_count( title->list_subtitle ); j++ )
+ hb_subtitle_t *subtitle = hb_list_item(title->list_subtitle, j);
+ if ((subtitle->source == VOBSUB || subtitle->source == PGSSUB) &&
+ (subtitle->width <= 0 || subtitle->height <= 0))
{
- hb_subtitle_t *subtitle = hb_list_item( title->list_subtitle, j );
- if ( subtitle->source == VOBSUB || subtitle->source == PGSSUB )
- {
- subtitle->width = title->geometry.width;
- subtitle->height = title->geometry.height;
- }
+ subtitle->width = title->geometry.width;
+ subtitle->height = title->geometry.height;
}
}
i++;