[Live-devel] Leak: Orhpan item is left in MediaLookUp table if AVI file creation fails.

Ross Finlayson finlayson at live555.com
Thu Sep 11 07:15:49 PDT 2008


>I noticed that if OpenOutputFile(env, outputFileName) method call in 
>AVIFileSink constructor fails, the AVIFileSink remains in the 
>MediaLookUp table.
>
>Addition to the table is done in the constructor of Medium and is 
>called in AVIFileSink constructor's initializer list. Since 
>AVIFileSink::createNew() returns NULL in this case, the client 
>application does not receive a reference to close the AVIFileSink.

Look at the code for "AVIFileSink::createNew()" again.  You'll see 
that it deletes the object if the output 'fid' was not created (i.e., is NULL).

The same is true for "QuickTimeFileSink".


	Ross Finlayson
	Live Networks, Inc. (LIVE555.COM)
	<http://www.live555.com/>



More information about the live-devel mailing list