ffmpeg | branch: master | rogerdpack <[email protected]> | Tue Aug 19 07:42:18 2014 -0600| [ea97859c8c218b83ab747a7eabcb88ca446f6751] | committer: Michael Niedermayer
gdigrab: fix gdi object leak if using mouse based on patch from [email protected] Signed-off-by: rogerdpack <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ea97859c8c218b83ab747a7eabcb88ca446f6751 --- libavdevice/gdigrab.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavdevice/gdigrab.c b/libavdevice/gdigrab.c index bccfef2..9a185d4 100644 --- a/libavdevice/gdigrab.c +++ b/libavdevice/gdigrab.c @@ -440,6 +440,8 @@ static void paint_mouse_pointer(AVFormatContext *s1, struct gdigrab *gdigrab) POINT pos; RECT clip_rect = gdigrab->clip_rect; HWND hwnd = gdigrab->hwnd; + info.hbmMask = NULL; + info.hbmColor = NULL; if (ci.flags != CURSOR_SHOWING) return; @@ -481,6 +483,10 @@ static void paint_mouse_pointer(AVFormatContext *s1, struct gdigrab *gdigrab) } icon_error: + if (info.hbmMask) + DeleteObject(info.hbmMask); + if (info.hbmColor) + DeleteObject(info.hbmColor); if (icon) DestroyCursor(icon); } else { _______________________________________________ ffmpeg-cvslog mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
