diff options
author | dynaflash <[email protected]> | 2011-08-17 15:43:14 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2011-08-17 15:43:14 +0000 |
commit | f1e686af3a262170e071a3bddbd7661bf956c7b9 (patch) | |
tree | 260f29be3958d1f0e2fc87eab0c797d55c837e74 /macosx | |
parent | ebc5352895fbb61f31d7e6f4b48718e5f9be2a0e (diff) |
MacGui: Fix a crash in live preview where upon closing the preview window during a live preview encode it was not being properly stopped so upon reopening and clicking on "Still Previews" there was a crashy.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4184 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HBPreviewController.m | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/macosx/HBPreviewController.m b/macosx/HBPreviewController.m index 35a4dd0a3..9e4e2f6f6 100644 --- a/macosx/HBPreviewController.m +++ b/macosx/HBPreviewController.m @@ -126,18 +126,12 @@ - (void)windowWillClose:(NSNotification *)aNotification { /* Upon Closing the picture window, we make sure we clean up any - * preview movie that might be playing + * preview movie that might be playing or encoding */ - hb_stop( fPreviewLibhb ); - isEncoding = NO; - // Show the picture view - [fPictureView setHidden:NO]; - [fMovieView pause:nil]; + [self pictureSliderChanged:nil]; [fMovieTimer invalidate]; [fMovieTimer release]; - [fMovieView setHidden:YES]; - [fMovieView setMovie:nil]; - + hudTimerSeconds = 0; [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"PreviewWindowIsOpen"]; } @@ -443,6 +437,9 @@ - (IBAction) pictureSliderChanged: (id) sender { + /* Run cancelCreateMoviePreview in case a preview is being encoded and then cancel if so */ + [self cancelCreateMoviePreview:nil]; + // Show the picture view [fPictureView setHidden:NO]; [fMovieView pause:nil]; |