so i have code that reads from an AVAsset using kCVPixelFormat_32BGRA. I get the next sample buffer by calling
[vidInput copyNextSamplebuffer];
Then I proceed with Apple's code on their AVFoundation guide http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/05_MediaRepresentations.html#//apple_ref/doc/uid/TP40010188-CH2-SW4
What troubles me is that sometimes
size_t bytesPerRow = CVPixelBufferGetBytesPerRow(imageBuffer);
gives me something that isnt the width*4, and as a result, when I attempt to use it, the image is teared very badly. Has anyone experienced anything similar?