[vlc-devel] Patch proposal about GDI objects leaking in directx plugin

Daniela Muzzu daniela.muzzu at selexelsag.com
Thu Sep 1 14:25:30 CEST 2011

Hello everybody,

I found a bug (maybe someway related to ticket #5030 and to
http://forum.videolan.org/viewtopic.php?f=32&t=78758) in DirectX plugin.

It happens that, each time a video playing is started and then stopped,
3 GDI objects are not released in Windows (reproduced with version
1.1.10). This can cause, in applications based on VLC countinuosly
playing short pieces of streams, the consumption of all available GDI
objects and the subsequent blocking of the player.

The bug can be easily reproduced by looking at the GDI objects counter
in Windows Task Manager and starting/stopping a stream with vlc player
(using DirectX). After stopping each video, GDI objects are incremented
by 3.

I also found the bugfixing: an icon, extracted with ExtractIcon in
modules/video_output/msw/events.c - DirectXCreateWindow, is not
destroyed (with DestroyIcon) in DirectXCloseWindow.

Sorry for not attaching a patch file, but should be quite simple to
fix :-)

Hope it will be included in next release.


More information about the vlc-devel mailing list