cleanup encoder_observer on detach and reset