Some time ago, refer to 86vr and China Virtual RealityCommunityPlay Avi onProgramI made a program for real-time playback by the camera, but it stopped in less than a minute. I checked it for a long time and did not know the reason.
Then we will create a video fusion project. We need to play a large AVI file in Vega and find that it stops playing for several minutes. Check out the reason for the memory leakage:
1. HDD = drawdibopen (); the statement is called in each call to the grabaviframe function. After that, it cannot be released until all programs are finished. Otherwise, the memory will leak, call drawdibclose (HDD) at the end of the grabaviframe function to release resources;
Second, glgentextures (1, & texture [0]); creates a texture. After using this texture, you need to call gldeletetextures (1, & texture [0]); to release resources.