[MediaCodec] Fix the bug of callback registration (#938)