Fixed memory leaks
authorCallum <callum@callum-ubuntu.(none)>
Sun, 8 Sep 2013 09:36:43 +0000 (17:36 +0800)
committerCallum <callum@callum-ubuntu.(none)>
Sun, 8 Sep 2013 09:36:43 +0000 (17:36 +0800)
camera/capture.c

index 815cef0..8ec196d 100644 (file)
@@ -22,14 +22,14 @@ int storeFrame( CvCapture* capture)
 
        /*int p[3];
        p[0] = CV_IMWRITE_JPEG_QUALITY;
-       p[1] = 10;
+       p[1] = 10;      //quality value; 0->100
        p[2] = 0;*/
                
        frame = cvQueryFrame(capture);
        if( frame == NULL)
                return 0;       //error
        cvSaveImage(filepath,frame,0);
-       
+       cvReleaseImageHeader(&frame);
        return 1;
 }
 

UCC git Repository :: git.ucc.asn.au