Memory Leak in Window Media Format SDK Reader Object (269529)



The information in this article applies to:

  • Microsoft Windows Media Format SDK 4.1

This article was previously published under Q269529

SYMPTOMS

When you use Microsoft Windows Media Format SDK version 4.1, a memory leak may occur when you create multiple instances of the IWMReader object by calling the WMCreateReader function.

RESOLUTION

The memory leak has been resolved in Windows Media Format SDK 7.0, which can be obtained from the following Web site:

STATUS

Microsoft has confirmed that this is a problem in Microsoft Windows Media Format SDK.

MORE INFORMATION

This problem can be reproduced by modifying the WMAPlay sample in the Windows Media Format SDK.

The existing WMAPlay sample demonstrates the IWMReader functionality by reading a WMA file and passing samples to a callback function defined by the application. The application then renders the sample to the audio device.

Modify Wmaplay.cpp to play the WMA file in an infinite loop.

int __cdecl main( int argc, char *argv[] )
{
    puts( "wmaplay.exe v0.2 -- plays Windows Media Audio streams\n" );
	 while(1){
		....
		....
		....
	}
}
					

By using Task Manager, you can see the VM usage increase. Eventually, the system stops responding.

Modification Type:MajorLast Reviewed:10/27/2000
Keywords:kbbug kbfile KB269529