Fixed sample video corrupted in MediaCodec mode.

Change-Id: I50c5660072d40f6e297e58fd026ea04c89d6a70a
related-to-bug: 6732061
Merge "Fixed sample video corrupted in MediaCodec mode." into jb-dev
merge in jb-mr0-release history after reset to jb-dev
Merge android-4.1.2_r1