X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavdevice%2Fdshow_pin.c;h=53b1c9150d94ae8aeb7f33e936c24d4b6b61050d;hb=f1b908d20a8800add3db281623eb9d8fb97162e5;hp=664246da92aba76e68332c61250360d5070d40d0;hpb=fb4a12cda4033f2f3d3d1039739f6e0e6f9afb82;p=ffmpeg diff --git a/libavdevice/dshow_pin.c b/libavdevice/dshow_pin.c index 664246da92a..53b1c9150d9 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