void gf_filter_lock(GF_Filter *filter, Bool do_lock)
{
	if (!filter) return;
	if (do_lock)
		gf_mx_p(filter->tasks_mx);
	else
		gf_mx_v(filter->tasks_mx);
}
void gf_filter_lock(GF_Filter *filter, Bool do_lock)
{
	if (!filter) return;
	if (do_lock)
		gf_mx_p(filter->tasks_mx);
	else
		gf_mx_v(filter->tasks_mx);
}