MediaCodec: check type before profile level to avoid hang on some MSM8960 devices