X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;ds=sidebyside;f=macosx%2FHBSubtitles.m;h=aca6c023b7df9c4dd3934c4a1335050113bc38b1;hb=4b72a63eb61a01275493c4bfb51ba02152d1c5e1;hp=027ff01089cb7989dc71d558b74bf97b89adb16b;hpb=6a8a8137cedcfdd7ccf4096f355bae8cbb7ae448;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/macosx/HBSubtitles.m b/macosx/HBSubtitles.m index 027ff010..aca6c023 100644 --- a/macosx/HBSubtitles.m +++ b/macosx/HBSubtitles.m @@ -758,12 +758,30 @@ { /* Since currently no quicktime based playback devices support soft vobsubs (bitmap) in mp4, we make sure - * "burned in" is specified by default to avoid massive confusion and anarchy. */ + * "burned in" is specified by default to avoid massive confusion and anarchy. However we also want to guard against + * multiple burned in subtitle tracks as libhb would ignore all but the first one anyway. Plus it would probably be + * stupid. + */ if (container == HB_MUX_MP4 && [anObject intValue] != 0) { if ([[[subtitleArray objectAtIndex:rowIndex] objectForKey:@"subtitleSourceTrackisPictureSub"] intValue] == 1) { - [[subtitleArray objectAtIndex:rowIndex] setObject:[NSNumber numberWithInt:1] forKey:@"subtitleTrackBurned"]; + /* lets see if there are currently any burned in subs specified */ + NSEnumerator *enumerator = [subtitleArray objectEnumerator]; + id tempObject; + BOOL subtrackBurnedInFound = NO; + while ( tempObject = [enumerator nextObject] ) + { + if ([[tempObject objectForKey:@"subtitleTrackBurned"] intValue] == 1) + { + subtrackBurnedInFound = YES; + } + } + /* if we have no current vobsub set to burn it in ... burn it in by default */ + if(!subtrackBurnedInFound) + { + [[subtitleArray objectAtIndex:rowIndex] setObject:[NSNumber numberWithInt:1] forKey:@"subtitleTrackBurned"]; + } } } @@ -912,7 +930,7 @@ } } - + }