diff options
author | Rodeo <[email protected]> | 2013-05-12 21:49:54 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2013-05-12 21:49:54 +0000 |
commit | 54548c1b81b719aba1810b9b21526fced9a675ce (patch) | |
tree | 477811d8b7fbc24b6319538229f16759ff3f26d2 /macosx | |
parent | f066cd8a80a6d5a6a84fe3aa87f33f94f95ade67 (diff) |
MacGui: stop before the last ("None") subtitle track when converting incompatible tracks to burn-in.
We were calling [[tempObject objectForKey:@"subtitleSourceTrackType"] intValue], so for "None", [nil intValue], which was returning 0. As it turns out, VOBSUB == 0 thus hb_subtitle_can_pass() was true out of sheer luck.
In a case where e.g. hb_subtitle_can_pass(VOBSUB, mux) is false (such as with the upcoming HB_MUX_AV_MP4 muxer), the None track would actually be deleted!
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5453 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HBSubtitles.m | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/macosx/HBSubtitles.m b/macosx/HBSubtitles.m index 94561a983..d8b4b6989 100644 --- a/macosx/HBSubtitles.m +++ b/macosx/HBSubtitles.m @@ -1009,8 +1009,9 @@ BOOL convertToBurnInUsed = NO; NSMutableArray *tracksToDelete = [[NSMutableArray alloc] init]; NSEnumerator *enumerator = [subtitleArray objectEnumerator]; - /* convert any incompatible tracks to burn-in or remove them */ - while (tempObject = [enumerator nextObject]) + /* convert any non-None incompatible tracks to burn-in or remove them */ + while ((tempObject = [enumerator nextObject]) && + [tempObject objectForKey:@"subtitleSourceTrackType"]) { subtitleTrackType = [[tempObject objectForKey:@"subtitleSourceTrackType"] intValue]; if (!hb_subtitle_can_pass(subtitleTrackType, container)) @@ -1032,7 +1033,8 @@ if (convertToBurnInUsed == YES) { enumerator = [subtitleArray objectEnumerator]; - while (tempObject = [enumerator nextObject]) + while ((tempObject = [enumerator nextObject]) && + [tempObject objectForKey:@"subtitleSourceTrackType"]) { subtitleTrackType = [[tempObject objectForKey:@"subtitleSourceTrackType"] intValue]; if (hb_subtitle_can_pass(subtitleTrackType, container)) |