[gst-devel] gdiscreencapsrc crashes after 3 minutes if cursor=true
Francis Rammeloo
francis.rammeloo at gmail.com
Wed Feb 24 17:37:20 CET 2010
2010/2/24 Francis Rammeloo <francis.rammeloo at gmail.com>:
> Do you want me to file a bug for this?
>
Actually I found the problem. The HBITMAP objects associated with the
cursor icon where not deleted causing a rapid increase in number of
used GDI objects.
This patch fixes the problem:
Index: Main/GStreamer/Source/gst-plugins-bad/sys/winscreencap/gstgdiscreencapsrc.c
===================================================================
--- Main/GStreamer/Source/gst-plugins-bad/sys/winscreencap/gstgdiscreencapsrc.c (revision
442)
+++ Main/GStreamer/Source/gst-plugins-bad/sys/winscreencap/gstgdiscreencapsrc.c (working
copy)
@@ -552,6 +552,9 @@
ci.ptScreenPos.x - src->src_rect.left - ii.xHotspot,
ci.ptScreenPos.y - src->src_rect.top - ii.yHotspot, ci.hCursor, 0, 0,
0, NULL, DI_DEFAULTSIZE | DI_NORMAL | DI_COMPAT);
+
+ DeleteObject (ii.hbmColor);
+ DeleteObject (ii.hbmMask);
}
}
More information about the gstreamer-devel
mailing list