On Fri, Aug 08, 2014 at 05:08:46PM +0800, hlszl1...@163.com wrote: > hi, all > > I'm using gdigrab feature on windows, and found that the count of gdi objects > owned by ffmpeg.exe increasing endlessly... > > Here is the patch, can someone commit it? > ---------------------------------------------- > diff --git a/libavdevice/gdigrab.c b/libavdevice/gdigrab.c > index bccfef2..e2bed14 100644 > --- a/libavdevice/gdigrab.c > +++ b/libavdevice/gdigrab.c > @@ -451,6 +451,10 @@ static void paint_mouse_pointer(AVFormatContext *s1, > struct gdigrab *gdigrab) > icon = CopyCursor(LoadCursor(NULL, IDC_ARROW)); > } > > + /*Remarks > + *GetIconInfo creates bitmaps for the hbmMask and hbmColor members of > ICONINFO. > + *The calling application must manage these bitmaps and delete them when > they are no longer necessary. > + */ > if (!GetIconInfo(icon, &info)) { > CURSOR_ERROR("Could not get icon info"); > goto icon_error; > @@ -481,6 +485,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 {
the patch has been mangled, probably by your mail user agent also CC-ing maintainer [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Old school: Use the lowest level language in which you can solve the problem conveniently. New school: Use the highest level language in which the latest supercomputer can solve the problem without the user falling asleep waiting.
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel