Make avfilter_destroy() code less convoluted, introducing a temporary