X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavdevice%2Fdshow_pin.c;h=53b1c9150d94ae8aeb7f33e936c24d4b6b61050d;hb=12bbfc4ccaa150e06895691049fa2ea33385d210;hp=664246da92aba76e68332c61250360d5070d40d0;hpb=1f1ec958f6c68a5ceafea206a99c895f62d0f3ec;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