Android MediaCodec can be used to decode output yuv420 format. I guess it should be NV12 format, but when I try it on Nexus6 7.1.1 device. The result is very stranger:
For 720p video, it works fine, the output yuv can be playbacked by ffplay with below command:
ffplay -v info -f rawvideo -pixel_format yuv420p -video_size 1280x720 out.yuv
And the out.yuv file size is exactly width*height*3/2.
For 1080p video, the output yuv color not correct at top. And the out.yuv file size is 3133440, but width*height*3/2 should be 3110400, so another 23040 bytes is there. Sounds like the top layer color not correct.
When try to decode it to surface, it looks good. so I guess issue come from 1080p YUV package only.