Merge "Add input buffer size check for software video encoders" into gingerbread