GF_Err gf_filter_assign_id(GF_Filter *filter, const char *id)
{
	if (!filter || filter->id) return GF_BAD_PARAM;

	if (!id) {
		char szID[1024];
		sprintf(szID, "_%p_", filter);
		filter->id = gf_strdup(szID);
	} else {
		filter->id = gf_strdup(id);
	}
	return GF_OK;
}
GF_Err gf_filter_assign_id(GF_Filter *filter, const char *id)
{
	if (!filter || filter->id) return GF_BAD_PARAM;

	if (!id) {
		char szID[1024];
		sprintf(szID, "_%p_", filter);
		filter->id = gf_strdup(szID);
	} else {
		filter->id = gf_strdup(id);
	}
	return GF_OK;
}