]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/dshow_pin.c
avdevice/xcbgrab: Handle reply and error properly
[ffmpeg] / libavdevice / dshow_pin.c
index 664246da92aba76e68332c61250360d5070d40d0..53b1c9150d94ae8aeb7f33e936c24d4b6b61050d 100644 (file)
@@ -249,8 +249,20 @@ libAVPin_Setup(libAVPin *this, libAVFilter *filter)
 
     return 1;
 }
+
+static void
+libAVPin_Free(libAVPin *this)
+{
+    if (!this)
+        return;
+    av_freep(&this->imemvtbl);
+    if (this->type.pbFormat) {
+        CoTaskMemFree(this->type.pbFormat);
+        this->type.pbFormat = NULL;
+    }
+}
 DECLARE_CREATE(libAVPin, libAVPin_Setup(this, filter), libAVFilter *filter)
-DECLARE_DESTROY(libAVPin, nothing)
+DECLARE_DESTROY(libAVPin, libAVPin_Free)
 
 /*****************************************************************************
  * libAVMemInputPin