summaryrefslogtreecommitdiff
path: root/libavdevice/dshow_pin.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavdevice/dshow_pin.c')
-rw-r--r--libavdevice/dshow_pin.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/libavdevice/dshow_pin.c b/libavdevice/dshow_pin.c
index 664246da92..53b1c9150d 100644
--- a/libavdevice/dshow_pin.c
+++ b/libavdevice/dshow_pin.c
@@ -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