i have an MJPEG stream over RTSP/UDP from which i want to generate JPEGs for a UIImageView with [UIImage initWithData:]. Most of the time this works good, but sometimes i get co
The initWithData: method should return nil in such cases.
initWithData:
nil
Try :
UIImage *myImage = [[UIImage alloc] initWithData:imgData]; if(!myImage) { // problem }