diff options
author | Rodeo <[email protected]> | 2012-03-31 15:13:48 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2012-03-31 15:13:48 +0000 |
commit | 636f331abc04645580697d90e0ed7eed49ea264b (patch) | |
tree | 52a3c0687f2daa541150f27c1f3d431db50cfd21 /macosx | |
parent | 57e4d1bcc1a8040562b2d248742ff74b34ca846a (diff) |
MacGUI: use hb_reset_job.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4564 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Controller.m | 29 | ||||
-rw-r--r-- | macosx/HBPreviewController.m | 3 |
2 files changed, 5 insertions, 27 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m index 522615f79..53a64b9d6 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -2741,18 +2741,8 @@ fWorkingCount = 0; [queueToApply setObject:[NSNumber numberWithInt:1] forKey:@"Status"]; [self saveQueueFileItem]; - /* we need to clean up the subtitle tracks after the job(s) have been set */ - int num_subtitle_tracks = hb_list_count(job->list_subtitle); - int ii; - for(ii = 0; ii < num_subtitle_tracks; ii++) - { - hb_subtitle_t * subtitle; - subtitle = (hb_subtitle_t *)hb_list_item(job->list_subtitle, 0); - - - hb_list_rem(job->list_subtitle, subtitle); - free(subtitle); - } + /* we need to clean up the various lists after the job(s) have been set */ + hb_reset_job( job ); /* We should be all setup so let 'er rip */ [self doRip]; @@ -3841,13 +3831,6 @@ bool one_burned = FALSE; job->acodec_fallback = [[queueToApply objectForKey: @"JobAudioEncoderFallback"] intValue]; /* Audio tracks and mixdowns */ - /* Lets make sure there arent any erroneous audio tracks in the job list, so lets make sure it's empty */ - int audiotrack_count = hb_list_count(job->list_audio); - for( int i = 0; i < audiotrack_count; i++ ) - { - hb_audio_t * temp_audio = (hb_audio_t*) hb_list_item( job->list_audio, 0 ); - hb_list_rem(job->list_audio, temp_audio); - } /* Now lets add our new tracks to the audio list here */ for (unsigned int counter = 0; counter < maximumNumberOfAllowedAudioTracks; counter++) { NSString *prefix = [NSString stringWithFormat: @"Audio%d", counter + 1]; @@ -4481,14 +4464,6 @@ bool one_burned = FALSE; userInfo: [NSDictionary dictionaryWithObjectsAndKeys: [NSData dataWithBytesNoCopy: &fTitle length: sizeof(fTitle) freeWhenDone: NO], keyTitleTag, nil]]]; - - /* Lets make sure there arent any erroneous audio tracks in the job list, so lets make sure its empty*/ - int audiotrack_count = hb_list_count(job->list_audio); - for( int i = 0; i < audiotrack_count;i++) - { - hb_audio_t * temp_audio = (hb_audio_t*) hb_list_item( job->list_audio, 0 ); - hb_list_rem(job->list_audio, temp_audio); - } [fVidRatePopUp selectItemAtIndex: 0]; diff --git a/macosx/HBPreviewController.m b/macosx/HBPreviewController.m index 3ec00d2a3..7b59f712b 100644 --- a/macosx/HBPreviewController.m +++ b/macosx/HBPreviewController.m @@ -906,6 +906,9 @@ job->pass = 0; hb_add( fPreviewLibhb, job ); + /* we need to clean up the various lists after the job(s) have been set */ + hb_reset_job( job ); + [fEncodingControlBox setHidden: NO]; [fPictureControlBox setHidden: YES]; |