Merge "Fix the encoder to support profile change"