use internal context if context type is wrong or no context

TODO:
filters need to manager their contexts, which sometimes are shared by
multiple filters. so shall we use smart ptr, like RefCount?