DO NOT MERGE omx: check buffer port before using

Bug: 28816827
Change-Id: I3d5bad4a1ef96dec544b05bb31cc6f7109aae0a5

status_t StatusFromOMXError(OMX_ERRORTYPE err) {
 switch (err) {
 case OMX_ErrorNone:
 return OK;
 case OMX_ErrorUnsupportedSetting:
 case OMX_ErrorUnsupportedIndex:
 return ERROR_UNSUPPORTED;
 case OMX_ErrorInsufficientResources:
 return NO_MEMORY;
 default:
 return UNKNOWN_ERROR;
 }
}

status_t StatusFromOMXError(OMX_ERRORTYPE err) {
 switch (err) {
 case OMX_ErrorNone:
 return OK;
 case OMX_ErrorUnsupportedSetting:
 case OMX_ErrorUnsupportedIndex:
 return ERROR_UNSUPPORTED;
 case OMX_ErrorInsufficientResources:
 return NO_MEMORY;
 default:
 return UNKNOWN_ERROR;
 }
}
