Various mediacodec fixes