Skip to content

Commit

Permalink
Merge pull request BradLarson#964 from jvaldera/master
Browse files Browse the repository at this point in the history
Fixed issue BradLarson#765
  • Loading branch information
BradLarson committed May 15, 2013
2 parents 4b87694 + 121b85c commit 480a226
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions framework/Source/GPUImageMovie.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
- (void)readNextAudioSampleFromOutput:(AVAssetReaderTrackOutput *)readerAudioTrackOutput;
- (void)startProcessing;
- (void)endProcessing;
- (void)cancelProcessing;
- (void)processMovieFrame:(CMSampleBufferRef)movieSampleBuffer;

@end
8 changes: 8 additions & 0 deletions framework/Source/GPUImageMovie.m
Original file line number Diff line number Diff line change
Expand Up @@ -361,4 +361,12 @@ - (void)endProcessing;
}
}

- (void)cancelProcessing
{
if (reader) {
[reader cancelReading];
}
[self endProcessing];
}

@end
2 changes: 1 addition & 1 deletion framework/Source/iOS/GPUImageMovieWriter.m
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ - (void)finishRecording;

- (void)finishRecordingWithCompletionHandler:(void (^)(void))handler;
{
if (assetWriter.status == AVAssetWriterStatusCompleted)
if (assetWriter.status == AVAssetWriterStatusCompleted || assetWriter.status == AVAssetWriterStatusCancelled)
{
return;
}
Expand Down

0 comments on commit 480a226

Please sign in to comment.