Commit a62a35e1 authored by Max Kellermann's avatar Max Kellermann

lib/ffmpeg/Filter: remove FilterContext destructor

Fixes potential double-free bugs which currently did not occur because the destructors happened to be called in the right order.
parent ca2439f5
......@@ -101,10 +101,10 @@ public:
FilterContext(FilterContext &&src) noexcept
:context(std::exchange(src.context, nullptr)) {}
~FilterContext() noexcept {
if (context != nullptr)
avfilter_free(context);
}
/* note: we don't need a destructor calling avfilter_free()
here because the AVFilterGraph owns and frees all the
AVFilterContext instances */
// TODO: do we really need this wrapper class anymore?
FilterContext &operator=(FilterContext &&src) noexcept {
using std::swap;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment