summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.m
diff options
context:
space:
mode:
authorRodeo <[email protected]>2013-05-11 19:38:49 +0000
committerRodeo <[email protected]>2013-05-11 19:38:49 +0000
commit7479f4af01737781d00bf48deb3b3d923ee8d664 (patch)
tree2850e93c593e9b503fa82a5ee6a1f3b99f3659ac /macosx/Controller.m
parenta09e24030d455e435096be0dbaf4370c5696d787 (diff)
MacGui: refactor handling on chapter titles.
job->list_chapters is reset by any call to hb_job_reset(), so store chapter titles in an NSArray instead. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5451 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.m')
-rw-r--r--macosx/Controller.m14
1 files changed, 1 insertions, 13 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m
index a94a2e177..c95ee6aa1 100644
--- a/macosx/Controller.m
+++ b/macosx/Controller.m
@@ -2566,19 +2566,7 @@ fWorkingCount = 0;
* in our queue, so they can be reapplied in prepareJob when this queue
* item comes up if Chapter Markers is set to on.
*/
- int i;
- NSMutableArray *ChapterNamesArray = [[NSMutableArray alloc] init];
- int chaptercount = hb_list_count( fTitle->job->list_chapter );
- for( i = 0; i < chaptercount; i++ )
- {
- hb_chapter_t *chapter = (hb_chapter_t *) hb_list_item( fTitle->job->list_chapter, i );
- if( chapter != NULL )
- {
- [ChapterNamesArray addObject:[NSString stringWithUTF8String:chapter->title]];
- }
- }
- [queueFileJob setObject:[NSMutableArray arrayWithArray: ChapterNamesArray] forKey:@"ChapterNames"];
- [ChapterNamesArray autorelease];
+ [queueFileJob setObject:[fChapterTitlesDelegate chapterTitlesArray] forKey:@"ChapterNames"];
/* Allow Mpeg4 64 bit formatting +4GB file sizes */
[queueFileJob setObject:[NSNumber numberWithInt:[fDstMp4LargeFileCheck state]] forKey:@"Mp4LargeFile"];