1

UPDATE: I know now that i'm sending messages to a deallocated instance, i think i've setup my project correct, but are starting to doubt this....

I've read brad's documentation and set up my project as no-arc, that will probably have something to do with the situation. I've added the linker flag -fobjc-arc and targeted GPUImage and my target to ios 4.3.

Any one out there with the same problem that discoverd what he/she was doing wrong????

I've been searching for an answer for days now, but I can't fix it and have run out of ideas.

Whenever I try to record a movie with the GPUImageMovieWriter my app crashes (EXC_BADACCESS) on:

CVPixelBufferPoolCreatePixelBuffer (NULL, [assetWriterPixelBufferInput pixelBufferPool], &renderTarget);

Full code:

    NSString *pathToMovie = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/file.mov"];
    unlink([pathToMovie UTF8String]); // If a file already exists, AVAssetWriter won't let you record new frames, so delete the old movie
    NSURL *movieURL = [NSURL fileURLWithPath:pathToMovie];



    GPUImageSepiaFilter *sepiaFilter = [[GPUImageSepiaFilter alloc] init];
    [videoCamera addTarget:sepiaFilter];


    movieWriter = [[GPUImageMovieWriter alloc] initWithMovieURL:movieURL size:CGSizeMake(640.0, 480.0)];
    movieWriter.encodingLiveVideo = YES;

    [sepiaFilter addTarget:movieWriter];


    movieWriter.shouldPassthroughAudio = YES;
    videoCamera.audioEncodingTarget = movieWriter;

    [movieWriter startRecording];

Ant help or pointers welcome!

4

0 に答える 0